Closed jayasurian123 closed 3 years ago
hey Jayasurian, thanks. Is there a reason why you add the apostrophes around the T?
it should work I think, like this:
let epoch = 1510850065194
let s = spacetime(epoch, 'Canada/Eastern')
let str = s.unixFmt('yyyy-MM-ddTHH:mm:ssZ') // ISO8601Format
// 2017-11-16T11:34:25-0500
let me know if I've misunderstood cheers
Hi -- having a similar issue here when trying to use unixFmt to format a time for display in French.
s.unixFmt("HH'h'mm")
// output: HHh49
// expected output: 14h49
ah - thanks Kayla. Good eye. Will take a look at supporting the quote-style escaping. In the short-term, you'll probably have to split it into two fmt commands. cheers
Thanks! It seems to be only an issue when there is not a space before the quoted character -- ex this works as expected
s.unixFmt("HH 'h' mm")
// output: 14 h 49
// exected output: 14 h 49
fixed in v6.12.2
thanks!
unixFmt method is not formatting correctly with 'T' eg. from the unit test case
Its somehow adds T to the previous character and makes it
ddT
.I have tried to check it and fix my own but there were not enough test example case for the quoted string.