@@ -18,6 +18,8 @@ var FORMAT_LINK = require('../../constants/docs').FORMAT_LINK;
18
18
var DATE_FORMAT_LINK = require ( '../../constants/docs' ) . DATE_FORMAT_LINK ;
19
19
var ONEDAY = require ( '../../constants/numerical' ) . ONEDAY ;
20
20
var constants = require ( './constants' ) ;
21
+ var HOUR = constants . HOUR_PATTERN ;
22
+ var DAY_OF_WEEK = constants . WEEKDAY_PATTERN ;
21
23
22
24
module . exports = {
23
25
visible : {
@@ -278,19 +280,19 @@ module.exports = {
278
280
279
281
pattern : {
280
282
valType : 'enumerated' ,
281
- values : [ 'day of week' , 'hour' , '' ] ,
283
+ values : [ DAY_OF_WEEK , HOUR , '' ] ,
282
284
dflt : '' ,
283
285
role : 'info' ,
284
286
editType : 'calc' ,
285
287
description : [
286
288
'Determines a pattern on the time line that generates breaks.' ,
287
- 'If *day of week * - Sunday-based weekday as a decimal number [0, 6].' ,
288
- 'If *hour * - hour (24-hour clock) as a decimal number [0, 23 ].' ,
289
+ 'If *' + DAY_OF_WEEK + ' * - Sunday-based weekday as a decimal number [0, 6].',
290
+ 'If *' + HOUR + ' * - hour (24-hour clock) as integer numbers [0, 24 ].',
289
291
'for more info.' ,
290
292
'Examples:' ,
291
- '- { pattern: \'day of week \', bounds: [6, 0] }' ,
293
+ '- { pattern: \'' + DAY_OF_WEEK + ' \', bounds: [6, 0] }',
292
294
' breaks from Saturday to Monday (i.e. skips the weekends).' ,
293
- '- { pattern: \'hour \', bounds: [17, 8], operation: \'()\' }' , // TODO: simplify after revise defaults
295
+ '- { pattern: \'' + HOUR + ' \', bounds: [17, 8], operation: \'()\' }', // TODO: simplify after revise defaults
294
296
' breaks from 5pm to 8am (i.e. skips non-work hours).'
295
297
] . join ( ' ' )
296
298
} ,
0 commit comments