@mindfulness/utils
    Preparing search index...

    Namespace date

    Common Helpers

    format

    Format the date.

    formatDistanceToNow

    Return the distance between the given date and now in words.

    isAfter

    Is the first date after the second one?

    isBefore

    Is the first date before the second one?

    isDate

    Is the given value a date?

    isFuture

    Is the given date in the future?

    isPast

    Is the given date in the past?

    isValid

    Is the given date valid?

    Day Helpers

    addDays

    Add the specified number of days to the given date.

    differenceInCalendarDays

    Get the number of calendar days between the given dates.

    differenceInDays

    Get the number of full days between the given dates.

    endOfDay

    Return the end of a day for the given date.

    getDayOfYear

    Get the day of the year of the given date.

    startOfDay

    Return the start of a day for the given date.

    subDays

    Subtract the specified number of days from the given date.

    Hour Helpers

    addHours

    Add the specified number of hours to the given date.

    differenceInHours

    Get the number of hours between the given dates.

    endOfHour

    Return the end of an hour for the given date.

    getHours

    Get the hours of the given date.

    setHours

    Set the hours to the given date.

    startOfHour

    Return the start of an hour for the given date.

    subHours

    Subtract the specified number of hours from the given date.

    Minute Helpers

    addMinutes

    Add the specified number of minutes to the given date.

    differenceInMinutes

    Get the number of minutes between the given dates.

    endOfMinute

    Return the end of a minute for the given date.

    getMinutes

    Get the minutes of the given date.

    setMinutes

    Set the minutes to the given date.

    startOfMinute

    Return the start of a minute for the given date.

    subMinutes

    Subtract the specified number of minutes from the given date.

    Month Helpers

    addMonths

    Add the specified number of months to the given date.

    differenceInMonths

    Get the number of full months between the given dates.

    endOfMonth

    Return the end of a month for the given date.

    getMonth

    Get the month of the given date.

    setMonth

    Set the month to the given date.

    startOfMonth

    Return the start of a month for the given date.

    subMonths

    Subtract the specified number of months from the given date.

    Other

    DateString
    daysBetween
    daysUntil
    fromUnix
    getHourOfYear
    getMindfulDate
    getUtcOffset
    isAfternoon
    isBetweenDates
    isEvening
    isMorning
    subSeconds
    today
    toUnix
    unixDate
    unixTimestamp

    Second Helpers

    addSeconds

    Add the specified number of seconds to the given date.

    differenceInSeconds

    Get the number of seconds between the given dates.

    endOfSecond

    Return the end of a second for the given date.

    getSeconds

    Get the seconds of the given date.

    setSeconds

    Set the seconds to the given date, with context support.

    startOfSecond

    Return the start of a second for the given date.

    Week Helpers

    addWeeks

    Add the specified number of weeks to the given date.

    differenceInWeeks

    Get the number of full weeks between the given dates.

    endOfWeek

    Return the end of a week for the given date.

    getWeek

    Get the local week index of the given date.

    setWeek

    Set the local week to the given date.

    startOfWeek

    Return the start of a week for the given date.

    subWeeks

    Subtract the specified number of weeks from the given date.

    Weekday Helpers

    getDay

    Get the day of the week of the given date.

    setDay

    Set the day of the week to the given date.

    Year Helpers

    addYears

    Add the specified number of years to the given date.

    differenceInYears

    Get the number of full years between the given dates.

    endOfYear

    Return the end of a year for the given date.

    getYear

    Get the year of the given date.

    setYear

    Set the year to the given date.

    startOfYear

    Return the start of a year for the given date.

    subYears

    Subtract the specified number of years from the given date.