• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/tcl-105/tcl_ext/tcllib/tcllib/modules/calendar/

Lines Matching refs:date

20 # Many of the routines in this file accept the name of a "date array"
22 # of a civil date. While few if any routines use or set all the fields,
72 # The following fields in a date array change the behavior of FISCAL_YEAR
92 # calendar prior to a certain date that varies with the locale, and
135 # on or before a given date (e.g., Sunday on or before January 2).
182 upvar 1 $dateVar date
183 switch -exact $date(ERA) {
185 return [expr { 1 - $date(YEAR) }]
188 return $date(YEAR)
191 return -code error "Unknown era \"$date(ERA)\""
227 # as a Julian day number. (This date is 2 January, 1 C.E., in the
275 # Convert a date on the Gregorian calendar expressed as
287 # noon of the given date.
297 upvar 1 $dateArray date
305 set y [calendar::CommonCalendar::CivilYearToAbsolute date]
311 + $date(DAY_OF_MONTH)
313 [lindex $daysInPriorMonthsInLeapYear $date(MONTH)]
314 : [lindex $daysInPriorMonths $date(MONTH)] )
327 # Convert a date expressed in the Gregorian calendar as era (BCE or CE),
348 upvar 1 $dateArray date
351 set y [CivilYearToAbsolute date]
355 + $date(DAY_OF_YEAR)
368 # Convert a date expressed in the system of era, fiscal year,
415 upvar 1 $dateArray date
420 if { ![info exists date(DAYS_IN_FIRST_WEEK)] } {
421 set date(DAYS_IN_FIRST_WEEK) $daysInFirstWeek
423 if { ![info exists date(FIRST_DAY_OF_WEEK)] } {
424 set date(FIRST_DAY_OF_WEEK) $firstDayOfWeek
429 set date2(ERA) $date(ERA)
430 set date2(YEAR) $date(FISCAL_YEAR)
432 set date2(DAY_OF_MONTH) $date(DAYS_IN_FIRST_WEEK)
434 $date(FIRST_DAY_OF_WEEK) \
440 + ( 7 * ( $date(WEEK_OF_YEAR) - 1 ) )
441 + $date(DAY_OF_WEEK) - $date(FIRST_DAY_OF_WEEK) }]
455 # date fields.
479 upvar 1 $dateVar date
485 array set date2 [array get date]
486 if { $date(DAY_OF_WEEK_IN_MONTH) >= 0 } {
509 set wd0 [WeekdayOnOrBefore $date(DAY_OF_WEEK) $zeroethDayOfMonth]
513 return [expr { $wd0 + 7 * $date(DAY_OF_WEEK_IN_MONTH) }]
527 # date fields.
546 upvar 1 $dateVar date
590 set date(YEAR) [expr { 1 - $year }]
591 set date(ERA) BCE
593 set date(YEAR) $year
594 set date(ERA) CE
599 set date(DAY_OF_YEAR) [expr { $day + 1 }]
629 upvar 1 $dateVar date
634 set year [JulianDayToEYD $j date]
635 set day $date(DAY_OF_YEAR)
650 set date(MONTH) $month
651 set date(DAY_OF_MONTH) $day
668 # fields of the date. The array may be prepared with
695 upvar 1 $dateVar date
697 if { ![info exists date(DAYS_IN_FIRST_WEEK)] } {
698 set date(DAYS_IN_FIRST_WEEK) $daysInFirstWeek
700 if { ![info exists date(FIRST_DAY_OF_WEEK)] } {
701 set date(FIRST_DAY_OF_WEEK) $firstDayOfWeek
716 $date(DAYS_IN_FIRST_WEEK) \
717 $date(FIRST_DAY_OF_WEEK)]
726 set date(FISCAL_YEAR) $date1(FISCAL_YEAR)
731 set date(WEEK_OF_YEAR) [expr { ( $dayOfFiscalYear / 7 ) + 1 }]
732 set date(DAY_OF_WEEK) [expr { ( $dayOfFiscalYear + 1 ) % 7 }]
733 if { $date(DAY_OF_WEEK) < $date(FIRST_DAY_OF_WEEK) } {
734 incr date(DAY_OF_WEEK) 7
751 # fields of the date.
758 # DAY_OF_WEEK_IN_MONTH fields of the given date are all filled
768 upvar 1 $dateVar date
772 JulianDayToEYMD $j date
776 set date(DAY_OF_WEEK) [expr { ( $j + 1 ) % 7 }]
780 set date(DAY_OF_WEEK_IN_MONTH) \
781 [expr { ( ( $date(DAY_OF_MONTH) - 1 ) / 7) + 1 }]