@akinon/akidate 0.4.1 → 0.5.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"akidate.d.ts","sourceRoot":"","sources":["../../src/akidate.ts"],"names":[],"mappings":"AAIA,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AAMzB,MAAM,WAAW,OAAO;IACtB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;CACnE;AAED,eAAO,MAAM,OAAO,EAAE,OAmBrB,CAAC"}
1
+ {"version":3,"file":"akidate.d.ts","sourceRoot":"","sources":["../../src/akidate.ts"],"names":[],"mappings":"AACA,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AASzB,MAAM,WAAW,OAAO;IACtB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;CACnE;AAED,eAAO,MAAM,OAAO,EAAE,OAmBrB,CAAC"}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.akidate = void 0;
4
- const dayjs_1 = require("dayjs");
5
- const localizedFormat_1 = require("dayjs/plugin/localizedFormat");
6
4
  // Import the locale files.
7
5
  require("dayjs/locale/ar");
8
6
  require("dayjs/locale/de");
@@ -12,6 +10,8 @@ require("dayjs/locale/fr");
12
10
  require("dayjs/locale/pt");
13
11
  require("dayjs/locale/ru");
14
12
  require("dayjs/locale/tr");
13
+ const dayjs_1 = require("dayjs");
14
+ const localizedFormat_1 = require("dayjs/plugin/localizedFormat");
15
15
  // Default to English.
16
16
  dayjs_1.default.locale('en');
17
17
  dayjs_1.default.extend(localizedFormat_1.default);
@@ -32,6 +32,6 @@ exports.akidate = {
32
32
  * @returns
33
33
  */
34
34
  formatIsoDate: (date, template) => {
35
- return (0, dayjs_1.default)(date).format(template);
35
+ return (0, dayjs_1.default)(date).format(template || 'L LT');
36
36
  }
37
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"akidate.d.ts","sourceRoot":"","sources":["../../src/akidate.ts"],"names":[],"mappings":"AAIA,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AAMzB,MAAM,WAAW,OAAO;IACtB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;CACnE;AAED,eAAO,MAAM,OAAO,EAAE,OAmBrB,CAAC"}
1
+ {"version":3,"file":"akidate.d.ts","sourceRoot":"","sources":["../../src/akidate.ts"],"names":[],"mappings":"AACA,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AASzB,MAAM,WAAW,OAAO;IACtB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;CACnE;AAED,eAAO,MAAM,OAAO,EAAE,OAmBrB,CAAC"}
@@ -1,5 +1,3 @@
1
- import dayjs from 'dayjs';
2
- import localizedFormat from 'dayjs/plugin/localizedFormat';
3
1
  // Import the locale files.
4
2
  import 'dayjs/locale/ar';
5
3
  import 'dayjs/locale/de';
@@ -9,6 +7,8 @@ import 'dayjs/locale/fr';
9
7
  import 'dayjs/locale/pt';
10
8
  import 'dayjs/locale/ru';
11
9
  import 'dayjs/locale/tr';
10
+ import dayjs from 'dayjs';
11
+ import localizedFormat from 'dayjs/plugin/localizedFormat';
12
12
  // Default to English.
13
13
  dayjs.locale('en');
14
14
  dayjs.extend(localizedFormat);
@@ -29,6 +29,6 @@ export const akidate = {
29
29
  * @returns
30
30
  */
31
31
  formatIsoDate: (date, template) => {
32
- return dayjs(date).format(template);
32
+ return dayjs(date).format(template || 'L LT');
33
33
  }
34
34
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akinon/akidate",
3
3
  "description": "A date library for Akinon",
4
- "version": "0.4.1",
4
+ "version": "0.5.0",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "main": "dist/esm/index.js",
@@ -17,9 +17,7 @@
17
17
  "copyfiles": "^2.4.1",
18
18
  "rimraf": "^5.0.5",
19
19
  "typescript": "^5.2.2",
20
- "@akinon/vite-config": "0.4.0",
21
- "@akinon/eslint-config": "0.1.0",
22
- "@akinon/typescript-config": "0.2.0"
20
+ "@akinon/typescript-config": "0.3.0"
23
21
  },
24
22
  "clean-package": "../../clean-package.config.json",
25
23
  "types": "dist/esm/index.d.ts",
@@ -36,10 +34,7 @@
36
34
  "build:esm": "tsc --outDir dist/esm",
37
35
  "build:commonjs": "tsc --module commonjs --outDir dist/cjs",
38
36
  "copy:files": "copyfiles -u 1 src/**/*.css dist/esm && copyfiles -u 1 src/**/*.css dist/cjs",
39
- "lint": "eslint *.ts*",
40
- "test": "vitest run",
41
- "test:ui": "vitest --ui",
42
- "test:watch": "vitest watch",
37
+ "clean": "rimraf dist/",
43
38
  "typecheck": "tsc --noEmit"
44
39
  }
45
40
  }