Skip to content

Instantly share code, notes, and snippets.

View mametora's full-sized avatar
🏠
Working from home

Takanori Masuda mametora

🏠
Working from home
View GitHub Profile
@mametora
mametora / fiscalYear.ts
Last active March 15, 2023 16:07
TSで年度を扱うときに使いそうなやつ
const fiscalYearStartMonth = 3;
function monthDiff(date1: Date, date2: Date): number {
return (
date1.getMonth() -
date2.getMonth() +
12 * (date1.getFullYear() - date2.getFullYear())
);
}

Keybase proof

I hereby claim:

  • I am mametora on github.
  • I am mametora (https://keybase.io/mametora) on keybase.
  • I have a public key ASBJIuJpw05Ji3dqrpIrydIbpGI6ZQC33EcmULNk3bM9AQo

To claim this, I am signing this object: