@uplink-protocol/calendar-controller
Version:
Flexible calendar and time picker API supporting both calendar, date-picker, and time-picker integrations for any JavaScript framework or library
40 lines (20 loc) • 644 B
Markdown
[**@uplink-protocol/form-controller v0.3.1**](../README.md)
***
[@uplink-protocol/form-controller](../globals.md) / roundTimeToStep
# Function: roundTimeToStep()
> **roundTimeToStep**(`time`, `minuteStep`, `secondStep`): `Date`
Defined in: [Time/utils/time.utils.ts:164](https://github.com/jmkcoder/uplink-protocol-calendar/blob/4cde26f472352440ee258db7670fce2e95651862/src/Time/utils/time.utils.ts#L164)
Round time to nearest step interval
## Parameters
### time
`Date`
Input time
### minuteStep
`number` = `1`
Step interval for minutes
### secondStep
`number` = `1`
Step interval for seconds
## Returns
`Date`
Rounded time