rss-feeder-mobilizon/utils.ts
2021-01-05 09:17:32 +01:00

19 lines
502 B
TypeScript

const moment = require("moment");
class utils {
convertRssDate(rssDate){
let converted = moment(rssDate).format('YYYY-MM-DD LTS').slice(0,-3).concat(".000000") ;// in js format like 2021-03-12T19:00:00Z
console.log('converted', converted)
// like 2021-01-03 15:31:02.918940
return converted
}
testdateconvert(){
let converted = this.convertRssDate('2021-03-12T19:00:00Z')
console.log('converted', converted)
}
}
export default utils;