Skip to content

Commit

Permalink
Merge pull request #244 from litespace-org/ahmed/dayjs
Browse files Browse the repository at this point in the history
fix(root): fix the dayjs pkg via patch
  • Loading branch information
neuodev authored Dec 24, 2024
2 parents bfed50a + cfcf97e commit f0414f8
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 16 deletions.
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,19 @@
"axios": "^1.7.7",
"concurrently": "^8.2.2",
"env-cmd": "^10.1.0",
"glob": "^11.0.0",
"lodash": "^4.17.21",
"rimraf": "^5.0.7",
"ts-node": "^10.9.2",
"vercel": "^34.2.7",
"vite-node": "^2.1.2",
"glob": "^11.0.0",
"lodash": "^4.17.21"
"vite-node": "^2.1.2"
},
"dependencies": {
"commander": "^12.1.0"
},
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
}
}
119 changes: 119 additions & 0 deletions patches/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
diff --git a/esm/locale/ar.js b/esm/locale/ar.js
index 78b99b8bf6f6bd96ae517d5b837009f9d96010d2..da353f06474e5f18d8c8c7e251fa4a64aee9f274 100644
--- a/esm/locale/ar.js
+++ b/esm/locale/ar.js
@@ -34,7 +34,7 @@ var locale = {
monthsShort: months,
weekStart: 6,
meridiem: function meridiem(hour) {
- return hour > 12 ? 'م' : 'ص';
+ return hour >= 12 ? 'م' : 'ص';
},
relativeTime: {
future: 'بعد %s',
diff --git a/locale/ar.js b/locale/ar.js
index 517c49e25d12aab7c6305aa07a6baaf6abaa3b7c..e571962e9da563ce30777d44a36e9d53948454e7 100644
--- a/locale/ar.js
+++ b/locale/ar.js
@@ -1 +1,99 @@
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ar=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r="يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),d={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},_={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},o={name:"ar",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),months:r,monthsShort:r,weekStart:6,meridiem:function(e){return e>12?"م":"ص"},relativeTime:{future:"بعد %s",past:"منذ %s",s:"ثانية واحدة",m:"دقيقة واحدة",mm:"%d دقائق",h:"ساعة واحدة",hh:"%d ساعات",d:"يوم واحد",dd:"%d أيام",M:"شهر واحد",MM:"%d أشهر",y:"عام واحد",yy:"%d أعوام"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return _[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return d[e]})).replace(/,/g,"،")},ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"}};return n.default.locale(o,null,!0),o}));
\ No newline at end of file
+!(function (e, t) {
+ "object" == typeof exports && "undefined" != typeof module
+ ? (module.exports = t(require("dayjs")))
+ : "function" == typeof define && define.amd
+ ? define(["dayjs"], t)
+ : ((e =
+ "undefined" != typeof globalThis
+ ? globalThis
+ : e || self).dayjs_locale_ar = t(e.dayjs));
+})(this, function (e) {
+ "use strict";
+ function t(e) {
+ return e && "object" == typeof e && "default" in e ? e : { default: e };
+ }
+ var n = t(e),
+ r =
+ "يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split(
+ "_"
+ ),
+ d = {
+ 1: "١",
+ 2: "٢",
+ 3: "٣",
+ 4: "٤",
+ 5: "٥",
+ 6: "٦",
+ 7: "٧",
+ 8: "٨",
+ 9: "٩",
+ 0: "٠",
+ },
+ _ = {
+ "١": "1",
+ "٢": "2",
+ "٣": "3",
+ "٤": "4",
+ "٥": "5",
+ "٦": "6",
+ "٧": "7",
+ "٨": "8",
+ "٩": "9",
+ "٠": "0",
+ },
+ o = {
+ name: "ar",
+ weekdays: "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split(
+ "_"
+ ),
+ weekdaysShort: "أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),
+ weekdaysMin: "ح_ن_ث_ر_خ_ج_س".split("_"),
+ months: r,
+ monthsShort: r,
+ weekStart: 6,
+ meridiem: function (e) {
+ return e >= 12 ? "م" : "ص";
+ },
+ relativeTime: {
+ future: "بعد %s",
+ past: "منذ %s",
+ s: "ثانية واحدة",
+ m: "دقيقة واحدة",
+ mm: "%d دقائق",
+ h: "ساعة واحدة",
+ hh: "%d ساعات",
+ d: "يوم واحد",
+ dd: "%d أيام",
+ M: "شهر واحد",
+ MM: "%d أشهر",
+ y: "عام واحد",
+ yy: "%d أعوام",
+ },
+ preparse: function (e) {
+ return e
+ .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (e) {
+ return _[e];
+ })
+ .replace(/،/g, ",");
+ },
+ postformat: function (e) {
+ return e
+ .replace(/\d/g, function (e) {
+ return d[e];
+ })
+ .replace(/,/g, "،");
+ },
+ ordinal: function (e) {
+ return e;
+ },
+ formats: {
+ LT: "HH:mm",
+ LTS: "HH:mm:ss",
+ L: "D/‏M/‏YYYY",
+ LL: "D MMMM YYYY",
+ LLL: "D MMMM YYYY HH:mm",
+ LLLL: "dddd D MMMM YYYY HH:mm",
+ },
+ };
+ return n.default.locale(o, null, !0), o;
+});
31 changes: 18 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f0414f8

Please sign in to comment.