@enure/jacklin 1.3.5 → 1.4.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.
package/index.js CHANGED
@@ -14,6 +14,18 @@ Handlebars.registerHelper("summaryToList", (string) => {
14
14
  }
15
15
  });
16
16
 
17
+ Handlebars.registerHelper("getShortDate", (dateStr) => {
18
+ if (typeof dateStr === 'string') {
19
+ const date = new Date(dateStr);
20
+ const year = date.getFullYear();
21
+ const month = date.getMonth();
22
+ const fullMonth = month.toString().length === 1 ? `0${month} : ${month}`;
23
+ return `${year}-${fullMonth}`;
24
+ } else {
25
+ return dateStr;
26
+ }
27
+ });
28
+
17
29
  export const render = (resume) => {
18
30
  const modulePath = dirname(fileURLToPath(import.meta.url));
19
31
  const template = readFileSync(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enure/jacklin",
3
- "version": "1.3.5",
3
+ "version": "1.4.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -139,7 +139,7 @@
139
139
  {{this.position}} at {{this.name}}
140
140
  </div>
141
141
  <div class="WorkList-dates">
142
- {{this.startDate}} to {{#if this.endDate }}{{this.endDate}}{{/if}}{{#unless this.endDate }}current{{/unless}}
142
+ {{getShortDate this.startDate}} to {{#if this.endDate }}{{getShortDate this.endDate}}{{/if}}{{#unless this.endDate }}current{{/unless}}
143
143
  </div>
144
144
  <div class="WorkList-summary">
145
145
  {{{summaryToList this.summary}}}