mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
move isLeap to Util
This commit is contained in:
@@ -169,6 +169,10 @@ module.exports = class Util {
|
||||
return today;
|
||||
}
|
||||
|
||||
static isLeap(year) {
|
||||
return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0);
|
||||
}
|
||||
|
||||
static magikToBuffer(magik) {
|
||||
return new Promise((res, rej) => {
|
||||
magik.toBuffer((err, buffer) => {
|
||||
|
||||
Reference in New Issue
Block a user