Hi @mwiktowy, you are correct, timestamp.js
is not needed for Pikaday.
It is needed for most date calculations, though, where I would convert a date to Unix epoch using format:date[TIMESTAMP]
, then do some calculations on it, e.g. subtract a number of days / microseconds, and then convert it back using format:timestamp[]
to human-readable date. It is the only way to do so without having to worry about month or year boundaries and such…
I should note that I originally changed Kixam’s datepicker.js
to only work with the date format TW uses for its created
or modified
fields, and thus was able to remove the no longer needed moment.js library. For the calendar I did add custom date formats back in by using TW-internal functions and the JavaScript Date
object. This is not comprehensively tested beyond what I needed for the calendar thingy. If you find any problems I suggest you message me directly or open a new thread specifically for that.