Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Add utility class for date handling #6

Open
Matthimatiker opened this issue Jun 22, 2012 · 0 comments
Open

Add utility class for date handling #6

Matthimatiker opened this issue Jun 22, 2012 · 0 comments
Labels

Comments

@Matthimatiker
Copy link
Owner

Create a helper class that handles date/datetime values in format yyyy-mm-dd hh:mm:ss (for example "1970-01-01 00:00:00").

Some useful methods could be:

  • isDate(mixed) : boolean
  • isDatetime(mixed): boolean
  • isTime(mixed) : boolean
  • toDate(timestamp) : string
  • toDatetime(timestamp) : string
  • toTime(timestamp) : string
  • toTimestamp(dateOrDatetime) : integer
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant