deno.land / x / february29th@0.1.1 / src / february29th.ts

february29th.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
/**Finds out whether or not the current date is February 29th. * @returns {boolean} Returns true if the current date is February 29th, and false if not.*/export default function isFebruary29th(): boolean { const date = new Date(); //Get the date
if ((date.getDate() === 29) && (date.getMonth() === 1)) return true; //Check if it's February 29th and return true else return false; //Return false otherwise}
february29th

Version Info

Tagged at
3 years ago

External Dependencies

No external dependencies 🎉