You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// different timezone will result in different datestring
parser.setDate(new Date);
datestring = parser.getText(timezone);
// if the timezone is not provided, it should look 'Z' token in datestring for the timezone.
parser.parse(datestring, timezone);
date = parser.getDate();
The text was updated successfully, but these errors were encountered:
parser.setTimezone(timezone);
parser.setDate(new Date); // always use time stamp of the date object
parser.getText(); // get different text under different timezone
parser.parse(datestring); // if datestring contains timezone definition
// (i.e. 'Z' token), set timezone before parsing.
// result timestamp will be move to correct timezone.
parser.getDate();
---- parse --> -- de-offset -->
datestring dateobject realModel
<-- getText -- <--- offset ----
Only create new Date in offset/de-offset phase.
Set timezone in parse phase.
Get timezone in getText phase.
The date filter in Angular now accept
timezone
argument. We should support it as well.https://docs.angularjs.org/api/ng/filter/date
Maybe something like:
The text was updated successfully, but these errors were encountered: