@tidepool/viz@0.8.1 apidocs /Users/jebeck/Tidepool/viz jsdoc2md "src/utils/datetime.js"
Functions
- getTimezoneFromTimePrefs(timePrefs) ⇒
String
getTimezoneFromTimePrefs
- formatBirthdate(patient) ⇒
String
formatBirthdate
- formatClocktimeFromMsPer24(duration, [format]) ⇒
String
formatClocktimeFromMsPer24
- formatDiagnosisDate(patient) ⇒
String
formatDiagnosisDate
- formatLocalizedFromUTC(utc, timePrefs, [format]) ⇒
String
formatLocalizedFromUTC
- getHammertimeFromDatumWithTimePrefs(datum, timePrefs) ⇒
Number
getHammertimeFromDatumWithTimePrefs
- getLocalizedCeiling(utc, timePrefs) ⇒
Object
getLocalizedCeiling
getTimezoneFromTimePrefs(timePrefs) ⇒ String
getTimezoneFromTimePrefs
Kind: global function
Returns: String
- timezoneName
Param | Type | Description |
---|---|---|
timePrefs | Object |
object containing timezoneAware Boolean and timezoneName String |
formatBirthdate(patient) ⇒ String
formatBirthdate
Kind: global function
Returns: String
- formatted birthdate, e.g., 'Jul 4, 1975'; empty String if none found
Param | Type | Description |
---|---|---|
patient | Object |
Tidepool patient object containing profile |
formatClocktimeFromMsPer24(duration, [format]) ⇒ String
formatClocktimeFromMsPer24
Kind: global function
Returns: String
- formatted clocktime, e.g., '12:05 pm'
Param | Type | Description |
---|---|---|
duration | Number |
positive integer representing a time of day in milliseconds within a 24-hr day |
[format] | String |
optional moment display format string; default is 'h:mm a' |
formatDiagnosisDate(patient) ⇒ String
formatDiagnosisDate
Kind: global function
Returns: String
- formatted diagnosis date, e.g., 'Jul 4, 1975'; empty String if none found
Param | Type | Description |
---|---|---|
patient | Object |
Tidepool patient object containing profile |
formatLocalizedFromUTC(utc, timePrefs, [format]) ⇒ String
formatLocalizedFromUTC
Kind: global function
Returns: String
- formatted datetime, e.g., 'Sunday, January 1'
Param | Type | Description |
---|---|---|
utc | String |
Zulu timestamp (Integer hammertime also OK) |
timePrefs | Object |
object containing timezoneAware Boolean and timezoneName String |
[format] | String |
optional moment display format string; default is 'dddd, MMMM D' |
getHammertimeFromDatumWithTimePrefs(datum, timePrefs) ⇒ Number
getHammertimeFromDatumWithTimePrefs
Kind: global function
Returns: Number
- Integer hammertime (i.e., UTC time in milliseconds)
Param | Type | Description |
---|---|---|
datum | Object |
a Tidepool datum with a time (required) and deviceTime (optional) |
timePrefs | Object |
object containing timezoneAware Boolean and timezoneName String |
getLocalizedCeiling(utc, timePrefs) ⇒ Object
getLocalizedCeiling
Kind: global function
Returns: Object
- a JavaScript Date, the closest (future) midnight according to timePrefs;
if utc is already local midnight, returns utc
Param | Type | Description |
---|---|---|
utc | String |
Zulu timestamp (Integer hammertime also OK) |
timePrefs | Object |
object containing timezoneAware Boolean and timezoneName String |