Blame view

juvenile-prosecution-vue/src/components/jeecg/JEasyCron/tabs/const.js 415 Bytes
6c637641   wxy   no message
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  export const WEEK_MAP_EN = {
    'SUN': '0',
    'MON': '1',
    'TUE': '2',
    'WED': '3',
    'THU': '4',
    'FRI': '5',
    'SAT': '6'
  }
  
  export const replaceWeekName = (c) => {
    // console.info('after: ' + c)
    if (c) {
      Object.keys(WEEK_MAP_EN).forEach(k => {
        c = c.replace(new RegExp(k, 'g'), WEEK_MAP_EN[k])
      })
      c = c.replace(new RegExp('7', 'g'), '0')
    }
    // console.info('after: ' + c)
    return c
  }