@formkit/tempo 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/yearDays.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import { date } from "./date.mjs";
3
3
  function yearDays(inputDate) {
4
4
  const d = date(inputDate);
5
- return (new Date(d.getFullYear() + 1, 0, 0).getTime() - new Date(d.getFullYear(), 0, 0).getTime()) / 864e5;
5
+ return (Date.UTC(d.getFullYear() + 1, 0, 0) - Date.UTC(d.getFullYear(), 0, 0)) / 864e5;
6
6
  }
7
7
  export {
8
8
  yearDays
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/yearDays.ts"],"sourcesContent":["import { date } from \"./date\"\nimport type { MaybeDateInput } from \"./types\"\n\n/**\n * Get the number of days in the given date’s year.\n * @param [inputDate] - A string, Date object or nothing for the current year\n */\nexport function yearDays(inputDate?: MaybeDateInput): number {\n const d = date(inputDate)\n return (\n (new Date(d.getFullYear() + 1, 0, 0).getTime() -\n new Date(d.getFullYear(), 0, 0).getTime()) /\n 86400000\n )\n}\n"],"mappings":";AAAA,SAAS,YAAY;AAOd,SAAS,SAAS,WAAoC;AAC3D,QAAM,IAAI,KAAK,SAAS;AACxB,UACG,IAAI,KAAK,EAAE,YAAY,IAAI,GAAG,GAAG,CAAC,EAAE,QAAQ,IAC3C,IAAI,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,EAAE,QAAQ,KAC1C;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/yearDays.ts"],"sourcesContent":["import { date } from \"./date\"\nimport type { MaybeDateInput } from \"./types\"\n\n/**\n * Get the number of days in the given date’s year.\n * @param [inputDate] - A string, Date object or nothing for the current year\n */\nexport function yearDays(inputDate?: MaybeDateInput): number {\n const d = date(inputDate)\n // Use UTC boundaries: local midnights can be shifted by DST/offset changes,\n // which would make the difference a non-integer number of days.\n return (\n (Date.UTC(d.getFullYear() + 1, 0, 0) - Date.UTC(d.getFullYear(), 0, 0)) / 86400000\n )\n}\n"],"mappings":";AAAA,SAAS,YAAY;AAOd,SAAS,SAAS,WAAoC;AAC3D,QAAM,IAAI,KAAK,SAAS;AAGxB,UACG,KAAK,IAAI,EAAE,YAAY,IAAI,GAAG,GAAG,CAAC,IAAI,KAAK,IAAI,EAAE,YAAY,GAAG,GAAG,CAAC,KAAK;AAE9E;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formkit/tempo",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "packageManager": "pnpm@10.11.0",
5
5
  "description": "The easiest way to work with dates in JavaScript and TypeScript.",
6
6
  "type": "module",