@managesome/eposmatic-toolkit 0.2.539 → 0.2.540

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.
@@ -68,6 +68,7 @@ export interface ILocalTimeFields {
68
68
  localWeekOfYear: number;
69
69
  localMonth: number;
70
70
  localQuarter: number;
71
+ localSemester: number;
71
72
  localYear: number;
72
73
  localDate: string;
73
74
  localTime: string;
@@ -9,6 +9,7 @@ export declare function getLocalDocumentFields(gmtOffset: number, date: Date): {
9
9
  localWeekOfYear: number;
10
10
  localMonth: number;
11
11
  localQuarter: number;
12
+ localSemester: number;
12
13
  localYear: number;
13
14
  localDate: string;
14
15
  localTime: string;
@@ -37,6 +37,8 @@ function getLocalDocumentFields(gmtOffset, date) {
37
37
  const localWeekOfYear = Math.ceil((dayOfYear + startOfYear.getDay()) / 7);
38
38
  // Calculate quarter (1-4)
39
39
  const localQuarter = Math.ceil(localMonth / 3);
40
+ // Calculate semester (1-2)
41
+ const localSemester = Math.ceil(localMonth / 6);
40
42
  // Format date and time strings
41
43
  const localDateString = `${localYear}-${String(localMonth).padStart(2, '0')}-${String(localDate).padStart(2, '0')}`;
42
44
  const localTimeString = `${String(localHour).padStart(2, '0')}:${String(localMinute).padStart(2, '0')}:${String(localSecond).padStart(2, '0')}`;
@@ -49,6 +51,7 @@ function getLocalDocumentFields(gmtOffset, date) {
49
51
  localWeekOfYear,
50
52
  localMonth,
51
53
  localQuarter,
54
+ localSemester,
52
55
  localYear,
53
56
  localDate: localDateString,
54
57
  localTime: localTimeString,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.539",
3
+ "version": "0.2.540",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",