UNPKG

mout

Version:

Modular Utilities

17 lines (16 loc) 301 B
"use strict"; exports.__esModule = true; /** * gets date quarter */ function quarter(date) { var month = date.getMonth(); if (month < 3) return 1; if (month < 6) return 2; if (month < 9) return 3; return 4; } exports["default"] = quarter;