date-fns#getMinutes TypeScript Examples
The following examples show how to use
date-fns#getMinutes.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: geometry.ts From nyxo-app with GNU General Public License v3.0 | 5 votes |
export function clockTimeToAngle(ISOStringDate?: string): number {
const time = new Date(ISOStringDate ?? new Date())
const angle =
((to12hClock(getHours(time)) + getMinutes(time) / 60) / 12) * 360
return angle
}
Example #2
Source File: sleep.ts From nyxo-app with GNU General Public License v3.0 | 5 votes |
export function getAngleAM(dateTime: string): number {
const time = new Date(dateTime)
const hourAngleAM =
((to12hClock(getHours(time)) + getMinutes(time) / 60) / 12) * 360
return hourAngleAM
}
Example #3
Source File: sleep.ts From nyxo-app with GNU General Public License v3.0 | 5 votes |
export function getAngle(dateTime: string): number {
const time = new Date(dateTime)
const hourAngle = ((getHours(time) + getMinutes(time) / 60) / 24) * 360
return hourAngle
}
Example #4
Source File: time.ts From nyxo-app with GNU General Public License v3.0 | 5 votes |
export function timeToPolar(time: string): number {
const date = new Date(time)
const angle =
((to12hClock(getHours(date)) + getMinutes(date) / 60) / 12) * 360
return angle
}