@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/bundle.mjs +5 -3
- package/dist/bundle.mjs.map +1 -1
- package/dist/common.mjs +4 -2
- package/dist/common.mjs.map +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/yearDays.mjs +1 -1
- package/dist/yearDays.mjs.map +1 -1
- package/package.json +1 -1
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 (
|
|
5
|
+
return (Date.UTC(d.getFullYear() + 1, 0, 0) - Date.UTC(d.getFullYear(), 0, 0)) / 864e5;
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
8
|
yearDays
|
package/dist/yearDays.mjs.map
CHANGED
|
@@ -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 (
|
|
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":[]}
|