- Timestamp:
- 07/06/06 16:13:57 (18 years ago)
- Location:
- trunk/SRC/Calendar
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Calendar/date2jul.pro
r118 r126 4 4 ;+ 5 5 ; 6 ; @file_comments gives julian day equivalent of a date in yyyymmdd format 6 ; @file_comments 7 ; gives julian day equivalent of a date in yyyymmdd format 7 8 ; 8 9 ; @categories calendar … … 10 11 ; @param date {in}{required} date in yyyymmdd format 11 12 ; 12 ; @keyword /GRADS {in}{optional}13 ; 14 ; 13 ; @keyword GRADS {in}{optional} 14 ; if 1 <= year <= 49 --> year = 2000 + year 15 ; if 50 <= year <= 99 --> year = 1900 + year 15 16 ; 16 17 ; @returns date in julian day 17 18 ; 18 ; @examples 19 ; @examples 19 20 ; 20 ; 21 ; IDL> print, date2jul(19931205) EQ julday(12,5,1993)21 ; IDL> jday = juldate(19930124) 22 ; IDL> print, date2jul(19931205) EQ julday(12,5,1993) 22 23 ; 1 23 ; IDL> print, date2jul(931205,/grads) EQ julday(12,5,1993)24 ; IDL> print, date2jul(931205,/grads) EQ julday(12,5,1993) 24 25 ; 1 25 26 ; -
trunk/SRC/Calendar/date2string.pro
r118 r126 4 4 ;+ 5 5 ; 6 ; @file_comments create a nice and readable format to print a date 6 ; @file_comments 7 ; create a nice and readable format to print a date 7 8 ; 8 9 ; @categories calendar, string … … 16 17 ; @returns a string containing the date in a easy readable format 17 18 ; 18 ; @examples 19 ; @examples 19 20 ; 20 ; 21 ; IDL> print, date2string(19900123) 21 22 ; Jan 23, 1990 22 ; 23 ; IDL> print, date2string(19900123, format = '(C(CMOA))') 23 24 ; JAN 23, 1990 24 25 ; -
trunk/SRC/Calendar/daysinmonth.pro
r118 r126 4 4 ;+ 5 5 ; 6 ; @file_comments give the number of days in a specific month 6 ; @file_comments 7 ; give the number of days in a specific month 7 8 ; 8 9 ; @categories calendar 9 10 ; 10 ; @param month {in}{optional} 11 ; @param year {in}{optional} 12 ; Year is used only if the common variable key_caltype = 'greg'. 13 ; In that case, month and year must have the same number of elements. 11 ; @param month {in}{optional} 12 ; @param year {in}{optional} 13 ; Year is used only if the common variable key_caltype = 'greg'. 14 ; In that case, month and year must have the same number of elements. 14 15 ; If not provided, we take month and year from "time" common variable. 15 16 ; … … 17 18 ; 18 19 ; @uses cm_4cal 19 ; 20 ; @examples 20 ; 21 ; @examples 21 22 ; IDL> ndays = daysinmonth(2, 2000) 22 23 ; … … 60 61 days_in_mth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] 61 62 return, days_in_mth[month-1] + leapyr(year)*(month EQ 2) 62 END 63 END 63 64 ELSE:return, report('only 3 types of calendar are accepted: greg, 360d and noleap') 64 65 ENDCASE 65 66 66 END 67 END -
trunk/SRC/Calendar/jul2date.pro
r118 r126 4 4 ;+ 5 5 ; 6 ; @file_comments gives yyyymmdd date equivalent of a julian day 6 ; @file_comments 7 ; gives yyyymmdd date equivalent of a julian day 7 8 ; 8 9 ; @categories calendar … … 12 13 ; @returns date in yyyymmdd format 13 14 ; 14 ; @examples 15 ; @examples 15 16 ; 16 ; 17 ; IDL> print, jul2date(julday(12,23,1999)) 17 18 ; 19991223 18 19 ; -
trunk/SRC/Calendar/leapyr.pro
r118 r126 2 2 ;+ 3 3 ; 4 ; @file_comments determine whether the input year is a leap year or not 4 ; @file_comments 5 ; determine whether the input year is a leap year or not 5 6 ; Very useful for finding number of days in a year. 6 7 ; eg. NUM_DAYS_IN_YR = 365 + leapyr(year) … … 10 11 ; @param year {in}{required} year to be tested as a leap year 11 12 ; 12 ; @returns 0 then not a leap year 13 ; @returns 0 then not a leap year 13 14 ; 1 then year is a leap year 14 15 ; … … 25 26 ; November 2004: correction for century years... S. Masson; 26 27 ; 27 ; Every year divisible by 4 is a leap year. 28 ; But every year divisible by 100 is NOT a leap year 28 ; Every year divisible by 4 is a leap year. 29 ; But every year divisible by 100 is NOT a leap year 29 30 ; Unless the year is also divisible by 400, then it is still a 30 31 ; leap year. 31 32 ; This means that year 1800, 1900, 2100, 2200, 2300 and 2500 are 32 ; NOT leap years, while year 2000 and 2400 are leap years. 33 ; NOT leap years, while year 2000 and 2400 are leap years. 33 34 ; + supress the automatic change 89 -> 1989 34 35 ; … … 49 50 IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 50 51 ; 51 IF key_caltype NE 'greg' THEN BEGIN 52 IF key_caltype NE 'greg' THEN BEGIN 52 53 sd = size(yr, /dimensions) 53 54 IF sd[0] EQ 0 THEN return, 0b ELSE return, bytarr(size(yr, /dimensions)) -
trunk/SRC/Calendar/monthname.pro
r118 r126 4 4 ;+ 5 5 ; 6 ; @file_comments gives the name of a month 6 ; @file_comments 7 ; gives the name of a month 7 8 ; 8 9 ; @categories calendar 9 ; 10 ; 10 11 ; @param mm1 {in}{required} the month number (from 1 to 12) 11 12 ; … … 16 17 ; @returns the month's name 17 18 ; 18 ; @examples 19 ; @examples 19 20 ; IDL> name=monthname(2) 20 21 ;
Note: See TracChangeset
for help on using the changeset viewer.