dnasir / angular-dateParser

A simple parser that converts date and time strings into Date object
http://dnasir.github.io/angular-dateParser/
MIT License
38 stars 25 forks source link

make possible to parse dates to UTC #44

Closed antonnikolaev closed 7 years ago

antonnikolaev commented 8 years ago

There is some scenarios when local time zone should be ignored taking the UTC time as model. One of the cases I see is when we need to parse dates without time with patterns like 'MMM dd, yyyy'.

dnasir commented 8 years ago

@antonnikolaev The purpose of this module is to provide the ability to reverse the stuff done by the angular date filter. If you provide the Z format string, you can control which timezone your code uses. i.e. MMM dd, yyyy Z

On the other hand, it's not that difficult to include the ability to set this up in the app .config() method.

dnasir commented 7 years ago

On second thought, I don't think this is a suitable feature to implement, as it will increase the complexity of this simple parser. Just use the Z format string if you need to handle timezones.