@miso.ai/server-commons 0.6.3-beta.14 → 0.6.3-beta.16

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/date.js +4 -0
package/package.json CHANGED
@@ -20,5 +20,5 @@
20
20
  "uuid": "^9.0.0",
21
21
  "yargs": "^17.5.1"
22
22
  },
23
- "version": "0.6.3-beta.14"
23
+ "version": "0.6.3-beta.16"
24
24
  }
package/src/date.js CHANGED
@@ -29,6 +29,10 @@ export function parseDuration(expr, unit) {
29
29
  return value * ts;
30
30
  }
31
31
 
32
+ export function getYear(dateStr) {
33
+ return new Date(dateStr).getFullYear();
34
+ }
35
+
32
36
  export function startOfDate(expr) {
33
37
  if (expr === undefined) {
34
38
  return undefined;