Skip to content

Commit

Permalink
fix: locale and it's tests after dropping commit
Browse files Browse the repository at this point in the history
  • Loading branch information
akamfoad committed Apr 14, 2022
1 parent c27e4fd commit f10c38b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
31 changes: 26 additions & 5 deletions src/locale/ku.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
// Kurdish [ku]
import dayjs from 'dayjs'
import {
englishToArabicNumbersMap,
arabicToEnglishNumbersMap
} from '../constant'

export const englishToArabicNumbersMap = {
1: '١',
2: '٢',
3: '٣',
4: '٤',
5: '٥',
6: '٦',
7: '٧',
8: '٨',
9: '٩',
0: '٠'
}

const arabicToEnglishNumbersMap = {
'١': '1',
'٢': '2',
'٣': '3',
'٤': '4',
'٥': '5',
'٦': '6',
'٧': '7',
'٨': '8',
'٩': '9',
'٠': '0'
}

const months = [
'کانوونی دووەم',
Expand Down Expand Up @@ -68,4 +90,3 @@ const locale = {
dayjs.locale(locale, null, true)

export default locale

3 changes: 1 addition & 2 deletions test/locale/ku.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import moment from 'moment'
import MockDate from 'mockdate'
import dayjs from '../../src'
import locale from '../../src/locale/ku'
import locale, { englishToArabicNumbersMap } from '../../src/locale/ku'
import preParsePostFormat from '../../src/plugin/preParsePostFormat'
import { englishToArabicNumbersMap } from '../../src/constant'

dayjs.extend(preParsePostFormat)

Expand Down

0 comments on commit f10c38b

Please sign in to comment.