Skip to content

Commit

Permalink
[Fix] Fix alias name of month & week-of-day
Browse files Browse the repository at this point in the history
  • Loading branch information
TsaiKoga committed Sep 18, 2019
1 parent 5f58f39 commit 0df87d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "IT-Tools",
"productName": "IT Tools",
"version": "1.5.0",
"version": "1.5.1",
"author": "TsaiKoga <[email protected]>",
"description": "Help programers quickly solve problem.To be a life saver.",
"license": "Apache-2.0",
Expand Down
12 changes: 12 additions & 0 deletions src/renderer/store/modules/Cron.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ const helpers = {
i18n.t('cronHelp.friday'),
i18n.t('cronHelp.saturday')
]
let aliases = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']
let numStr = String(num).toLowerCase()
if (aliases.includes(numStr)) {
num = aliases.findIndex(x => x === numStr)
}
return dayOfWeek[num]
},

Expand All @@ -235,6 +240,13 @@ const helpers = {
11: 'November',
12: 'December'
}

let aliases = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']
let numStr = String(num).toLowerCase()
if (aliases.includes(numStr)) {
num = aliases.findIndex(x => x === numStr) + 1
}

return (i18n.locale === 'en') ? dayOfMonth[num] : (num + i18n.t('cronHelp.month'))
},

Expand Down

1 comment on commit 0df87d3

@4everland
Copy link

@4everland 4everland bot commented on 0df87d3 Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following parameters

parameters Value
IPFS CID bafybeib5nsyiqls7mte2f422vaqi3iqqe5gqppndmbwfey46xsralj7p5q
Assigned domain https://it-tools-xygvbltn-tsaikoga.4everland.app
https://it-tools.4everland.app
Custom domain

Please sign in to comment.