Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/KorzhCom/EasyData
Browse files Browse the repository at this point in the history
  • Loading branch information
eqteamlead committed Dec 22, 2022
2 parents fcf50e5 + 8fe556f commit 6748a4a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,8 @@ dist/
/playground/EasyDataTest02
/playground/EasyDataAspNetCoreTest04
/EasyData.Dev2.sln
playground/EasyDataAspNetCoreTest01/EasyDataTest01.db
playground/EasyDataAspNetCoreTest01/EasyDataTest01.db-shm
playground/EasyDataAspNetCoreTest01/EasyDataTest01.db-wal
playground/EasyDataAspNetCoreTest01/wwwroot/js/dashboard.js
playground/EasyDataAspNetCoreTest01/wwwroot/js/dashboard.js.map
6 changes: 4 additions & 2 deletions easydata.js/packs/core/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ export namespace utils {
}
}

const DT_FORMAT_RGEX = /\[([^\]]+)]|y{4}|M{1,4}|d{1,2}|H{1,2}|h{1,2}|m{2}|s{2}|t{2}/g;
const DT_FORMAT_RGEX = /\[([^\]]+)]|y{2,4}|M{1,4}|d{1,2}|H{1,2}|h{1,2}|m{2}|s{2}|t{2}/g;

/**
* Returns string representation of the date/time value according to the custom format (second parameter)
Expand All @@ -537,6 +537,7 @@ export namespace utils {
*/
export function dateTimeToStr(date: Date, format: string): string {
const year = date.getFullYear();
const yearStr = year.toString();
const month = date.getMonth() + 1;
const day = date.getDate();

Expand All @@ -548,7 +549,8 @@ export namespace utils {
const isPm = hour > 11;

const matches = {
yyyy: year.toString(),
yyyy: yearStr,
yy: yearStr.substring(yearStr.length - 2),
MMMM: i18n.getLongMonthName(month),
MMM: i18n.getShortMonthName(month),
MM: (month < 10) ? '0' + month : month.toString(),
Expand Down
6 changes: 3 additions & 3 deletions easydata.js/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "1.4.10",
"baseVersion": "1.4.10",
"assetVersion": "01_04_10",
"version": "1.4.11",
"baseVersion": "1.4.11",
"assetVersion": "01_04_11",
"tag": "latest"
}

0 comments on commit 6748a4a

Please sign in to comment.