date
The date object provides functions for the creation and manipulation of JavaScript Date objects.
Methods
createDate
pb.date.createDate(dateStr, timeStr, opts)
Creates a date object given a date and time.
Returns: Date
- Returns a Date object.
Param | Type | Description |
---|---|---|
dateStr | string | e.g. 2011-10-31 |
timeStr | string | e.g. 12:00am or 1:00pm |
opts | createDateOptions | Additional options used to determine the returned date. |
dateToUTCTimestamp
pb.date.dateToUTCTimestamp(dateObj)
Takes a date object and returns a UTC timestamp which represents the number of seconds since January 1, 1970.
Returns: number
- UTC timestamp.
Param | Type | Description |
---|---|---|
dateObj | Date | A JavaScript Date object. |
dateToUTCString
pb.date.dateToUTCString(dateObj)
Takes a date object and returns a UTC date and time string.
Returns: string
- - UTC date and time string - ex. "2011-10-31 12:00:00" (12pm on Halloween)
Param | Type | Description |
---|---|---|
dateObj | Date | A JavaScript Date object. |
dateToString
pb.date.dateToString(dateObj)
Takes a date object and returns a JSON object containing various date and time formats in local time.
Returns: Object
- An object containing the supplied date in various formats.
Param | Type | Description |
---|---|---|
dateObj | Date | A JavaScript Date object. |
createDateOptions
Represents individual items that are displayed for a Submenu.
Properties
Name | Type | Description |
---|---|---|
[utc] | boolean | If true, the passed in time will be treated as UTC time. |