danielmoncada / date-time-picker

Angular Date Time Picker (Responsive Design)
https://daniel-projects.firebaseapp.com/owlng/date-time-picker
MIT License
141 stars 61 forks source link

Add UnixTimestampDateTimeAdapter #78

Closed sedran closed 3 years ago

sedran commented 3 years ago

Creates a new DateTimeAdapter implementation which uses unix timestamps (the number of milliseconds that have elapsed since January 1, 1970) in the form of number as NgModel value type.

Also moves some constants and utility methods in native-date-time-adapter to a common place since this adapter's implementation is very similar to native-date-time-adapter.

Further performance improvements may be done in the future. Some of the methods contain multiple date-number conversions.

danielmoncada commented 3 years ago

@sedran thank you for the PR!

Let me look it over first before I merge =]

sedran commented 3 years ago

@sedran thank you for the PR!

Let me look it over first before I merge =]

You're welcome, I've added this adapter into my team's project's source code. This adapter will be in production in a few months. If it is published under the library, we plan to remove it from the source code :)

danielmoncada commented 3 years ago

@sedran published, thanks again! https://www.npmjs.com/package/@danielmoncada/angular-datetime-picker/v/10.1.0

sedran commented 3 years ago

@sedran published, thanks again! https://www.npmjs.com/package/@danielmoncada/angular-datetime-picker/v/10.1.0

Thank you for publishing, now that we can remove the custom adapter from our source code :)