Get + Set
Day.js использует перегруженные геттеры и сеттеры, то есть вызов этих методов без параметров действует как геттер, а с параметром - как сеттер.
As dayjs objects are immutable, all setters will return a new dayjs instance.
These map to the corresponding function on the native Date
object.
dayjs().second(30).valueOf() // => new Date().setSeconds(30)
dayjs().second() // => new Date().getSeconds()
If you are in UTC mode, they will map to the UTC equivalent.
dayjs.utc().second(30).valueOf()// => new Date().setUTCSeconds(30)
dayjs.utc().second()// => new Date().getUTCSeconds()