Changeset 35426 in project
- Timestamp:
- 04/22/18 04:29:44 (10 months ago)
- Location:
- release/4/locale/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
release/4/locale/trunk/locale-components.scm
r35403 r35426 16 16 make-locale-components 17 17 locale-components? 18 check-locale-components 19 error-locale-components 18 check-locale-components error-locale-components 20 19 locale-components=? 21 20 locale-component-ref … … 26 25 make-timezone-components 27 26 timezone-components? 28 check-timezone-components 29 error-timezone-components 27 check-timezone-components error-timezone-components 30 28 set-timezone-component! 31 29 timezone-component-ref … … 33 31 ; 34 32 timezone-offset? 35 check-timezone-offset 36 error-timezone-offset 33 check-timezone-offset error-timezone-offset 37 34 ; 38 35 make-timezone-dst-rule-julian-leap 39 36 timezone-dst-rule-julian-leap? 40 check-timezone-dst-rule-julian-leap-day 41 error-timezone-dst-rule-julian-leap-day 37 check-timezone-dst-rule-julian-leap-day error-timezone-dst-rule-julian-leap-day 42 38 ; 43 39 make-timezone-dst-rule-julian-noleap 44 40 timezone-dst-rule-julian-noleap? 45 check-timezone-dst-rule-julian-noleap-day 46 error-timezone-dst-rule-julian-noleap-day 41 check-timezone-dst-rule-julian-noleap-day error-timezone-dst-rule-julian-noleap-day 47 42 ; 48 43 timezone-dst-rule-julian? … … 51 46 make-timezone-dst-rule-mwd 52 47 timezone-dst-rule-mwd? 53 check-timezone-dst-rule-mwd 54 error-timezone-dst-rule-mwd 55 check-timezone-dst-rule-mwd-day 56 error-timezone-dst-rule-mwd-day 57 check-timezone-dst-rule-mwd-week 58 error-timezone-dst-rule-mwd-week 59 check-timezone-dst-rule-mwd-month 60 error-timezone-dst-rule-mwd-month 48 check-timezone-dst-rule-mwd error-timezone-dst-rule-mwd 49 check-timezone-dst-rule-mwd-day error-timezone-dst-rule-mwd-day 50 check-timezone-dst-rule-mwd-week error-timezone-dst-rule-mwd-week 51 check-timezone-dst-rule-mwd-month error-timezone-dst-rule-mwd-month 61 52 timezone-components=? 62 53 timezone-dst-rule-day -
release/4/locale/trunk/locale-posix.scm
r35403 r35426 93 93 (define parse-posix-literal-timezone 94 94 (let ( 95 (name-re (regexp "(^[^<:][^0-9,+-]+)|^<([^>]+)>")) 95 (ext-name-re (regexp "(^[+-][0-9]+)|(^[^<:0-9,+-][^0-9,+-]*)|^<([^>]+)>")) 96 (int-name-re (regexp "(^[^<:0-9,+-][^0-9,+-]*)|^<([^>]+)>")) 96 97 (offset-re (regexp "^(\\+|-)?([0-9]+)(:[0-9]+)?(:[0-9]+)?")) 97 98 ;For compatibility with System V Release 3.1, a semicolon (`;') may be … … 205 206 ;DST section is optional 206 207 (let ( 207 (n-m (next-match name-re)) )208 (n-m (next-match int-name-re)) ) 208 209 (or 209 210 (not n-m) … … 217 218 #; ;XXX What does "ahead" mean? 218 219 (fx+ (timezone-component-ref tz 'std-offset) SEC/HR))) ) 219 (set-timezone-component! tz 'dst-name (ca dr n-m))220 (set-timezone-component! tz 'dst-name (car n-m)) 220 221 (set-timezone-component! tz 'dst-offset off) 221 222 ;Rule, if present, must be complete … … 228 229 ;Must have name & offset components 229 230 (let ( 230 (n-m (next-match name-re)) )231 (n-m (next-match ext-name-re)) ) 231 232 (cond 232 233 ((not n-m) … … 239 240 (fail "bad timezone STD offset") ) 240 241 (else 241 (set-timezone-component! tz 'std-name (ca dr n-m))242 (set-timezone-component! tz 'std-name (car n-m)) 242 243 (set-timezone-component! tz 'std-offset (hms->offset (cadr o-m) (cddr o-m))) 243 244 #t ) ) ) ) ) ) ) ) ) -
release/4/locale/trunk/tests/locale-test.scm
r35403 r35426 43 43 44 44 ; unsupported but not an error 45 (test-assert "T1" (not (posix-timezone-string->timezone-components ":foo,bar,baz"))) 45 (test-assert "T1a" (not (posix-timezone-string->timezone-components ":foo,bar,baz"))) 46 47 ; 48 (test-assert "T1b" (posix-timezone-string->timezone-components "+03-3:0:0XXXX-4:0:0")) 46 49 47 50 ; cannot have a name composed of digits
Note: See TracChangeset
for help on using the changeset viewer.