StartOfUnit extension

on

Methods

startOf(DurationUnit unit) DateTime
Returned object will have same timezone as this
startOfDay() DateTime
Returns start of the day
startOfHour() DateTime
Returns start of the hour
startOfIsoWeek() DateTime
Returns start of the ISO week (always Monday)
startOfLocalWeek([int? weekStart]) DateTime
Returns start of the week based on weekStart. If it's null, it uses Moment.defaultLocalization.weekStart
startOfMillisecond() DateTime
Returns start of the millisecond
startOfMinute() DateTime
Returns start of the minute
startOfMonth() DateTime
Returns start of the month
startOfSecond() DateTime
Returns start of the second
startOfYear() DateTime
Returns start of the year