Day.js

Day.js

  • Docs
  • GitHub
  • Languages iconEnglish
    • 中文
    • Русский
    • Help Translate

›Get + Set

Installation

  • Installation
  • Node.js
  • Browser
  • TypeScript
  • Download

Parse

  • Parse
  • Now
  • String
  • String + Format
  • Unix Timestamp (milliseconds)
  • Unix Timestamp (seconds)
  • Date
  • Object
  • Array
  • UTC
  • Dayjs Clone
  • Validation

Get + Set

  • Get + Set
  • Millisecond
  • Second
  • Minute
  • Hour
  • Date of Month
  • Day of Week
  • Day of Week (Locale Aware)
  • ISO Day of Week
  • Day of Year
  • Week of Year
  • Week of Year (ISO)
  • Month
  • Quarter
  • Year
  • Week Year
  • Week Year (ISO)
  • Weeks In Year (ISO)
  • Get
  • Set
  • Maximum
  • Minimum

Manipulate

  • Manipulate
  • Add
  • Subtract
  • Start of Time
  • End of Time
  • Local
  • UTC
  • UTC offset

Display

  • Display
  • Format
  • Time from now
  • Time from X
  • Time to now
  • Time to X
  • Calendar Time
  • Difference
  • Unix Timestamp (milliseconds)
  • Unix Timestamp
  • Days in Month
  • As Javascript Date
  • As Array
  • As JSON
  • As ISO 8601 String
  • As Object
  • As String

Query

  • Query
  • Is Before
  • Is Same
  • Is After
  • Is Same or Before
  • Is Same or After
  • Is Between
  • Is a Dayjs
  • Is Leap Year

i18n

  • i18n
  • Loading locale in NodeJS
  • Loading locale in the browser
  • Changing locale globally
  • Changing locales locally
  • Checking the current Day.js locale
  • Listing the months and weekdays of the current locale
  • Accessing locale specific functionality

Plugins

  • Plugin
  • Loading plugin in NodeJS
  • Loading plugin in the browser
  • AdvancedFormat
  • ArraySupport
  • BadMutable
  • BuddhistEra
  • Calendar
  • CustomParseFormat
  • DayOfYear
  • DevHelper
  • Duration
  • IsBetween
  • IsLeapYear
  • IsSameOrAfter
  • IsSameOrBefore
  • IsToday
  • IsTomorrow
  • IsYesterday
  • IsoWeek
  • IsoWeeksInYear
  • LocaleData
  • LocalizedFormat
  • MinMax
  • ObjectSupport
  • PluralGetSet
  • PreParsePostFormat
  • QuarterOfYear
  • RelativeTime
  • Timezone
  • ToArray
  • ToObject
  • UpdateLocale
  • UTC
  • weekOfYear
  • WeekYear
  • Weekday

Customize

  • Customize
  • Month Names
  • Month Abbreviations
  • Weekday Names
  • Weekday Abbreviations
  • Minimal Weekday Abbreviations
  • Relative Time
  • Calendar

Durations

  • Durations
  • Creating
  • Clone
  • Humanize
  • Format
  • Milliseconds
  • Seconds
  • Minutes
  • Hours
  • Days
  • Weeks
  • Months
  • Years
  • Add Time
  • Subtract Time
  • Using Duration with Diff
  • As Unit of Time
  • Get Unit of Time
  • As JSON
  • Is a Duration
  • As ISO 8601 String
  • Locale

Time Zone

  • Time Zone
  • Parsing in Zone
  • Converting to Zone
  • Guessing user zone
  • Set Default Timezone
Edit

Maximum

Returns the maximum (most distant future) of the given Day.js instances. This accepts both multiple arguments and array that contains Day.js instance.

This dependent on MinMax plugin to work

dayjs.extend(minMax)

dayjs.max(dayjs(), dayjs('2018-01-01'), dayjs('2019-01-01'))
dayjs.max([dayjs(), dayjs('2018-01-01'), dayjs('2019-01-01')])
← SetMinimum →
Day.js
Community
GitHubGitter🇨🇳 China Mirror 中国镜像站点Sitemap
Copyright © 2022 Day.js