Unformatted: {{ new Date() }}
16 | 17 |18 | Formatted with dayjs (template): 19 | {{ $dayjs(new Date()).format("DD/MM/YYYY") }} 20 |
21 | 22 |Formatted with dayjs (computed): {{ prettyDate }}
23 | 24 |25 | Formatted with dayjs (RelativeTime): {{ $dayjs(new Date()).fromNow() }} 26 |
27 | 28 |29 | Formatted locale : {{ $dayjs(new Date()).format('L') }} 30 |
31 | 32 |UTC: {{ $dayjs.utc().format() }}
39 | 40 |Weekday: {{ $dayjs().weekday() }}
41 | 42 |Day of year: {{ $dayjs().dayOfYear() }}
43 | 44 |Duration: {{ $dayjs.duration(10000) }}
45 | 46 | {{ $dayjs(new Date()).isBetween('2023-01-01', '2023-02-01', 'day', '[)') }} 47 | 48 |Is Leap year? {{ $dayjs().isLeapYear() }}
49 | 50 |Is same or after 2023-04-30 ? {{ $dayjs().isSameOrAfter('2023-04-30', 'day') }}
51 | 52 |Is same or before 2023-04-30 ? {{ $dayjs().isSameOrBefore('2023-04-30', 'day') }}
53 | 54 |Start of day to Now: {{ $dayjs($dayjs().startOf('day')).toNow() }}
55 | 56 |