Changeset 93 for trunk/SRC/Calendar
- Timestamp:
- 06/07/06 19:12:14 (18 years ago)
- Location:
- trunk/SRC/Calendar
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Calendar/date2jul.pro
r69 r93 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME: date2jul6 5 ; 7 ; PURPOSE:gives julian day equivalent of a date in yyyymmdd format6 ; gives julian day equivalent of a date in yyyymmdd format 8 7 ; 9 ; CATEGORY:calendar8 ; @categories calendar 10 9 ; 11 ; CALLING SEQUENCE: jday = juldate(19930124)10 ; @param date {in}{required} date in yyyymmdd format 12 11 ; 13 ; INPUTS: date in yyyymmdd format 14 ; 15 ; KEYWORD PARAMETERS: 16 ; 17 ; /GRADS: if 1 <= year <= 49 --> year = 2000 + year 12 ; @keyword /GRADS {in}{optional} 13 ; if 1 <= year <= 49 --> year = 2000 + year 18 14 ; if 50 <= year <= 99 --> year = 1900 + year 19 15 ; 20 ; OUTPUTS:date en jour julien16 ; @returns date in julian day 21 17 ; 22 ; COMMON BLOCKS: none18 ; @examples 23 19 ; 24 ; SIDE EFFECTS: ? 25 ; 26 ; RESTRICTIONS: ? 27 ; 28 ; EXAMPLE: 29 ; 20 ; IDL> jday = juldate(19930124) 30 21 ; IDL> print, date2jul(19931205) EQ julday(12,5,1993) 31 22 ; 1 … … 33 24 ; 1 34 25 ; 35 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)26 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 36 27 ; June 2005 37 28 ;- -
trunk/SRC/Calendar/date2string.pro
r9 r93 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME: date2string6 5 ; 7 ; PURPOSE:create a nice and readable format to print a date6 ; create a nice and readable format to print a date 8 7 ; 9 ; CATEGORY: calendar/string8 ; @categories calendar, string 10 9 ; 11 ; CALLING SEQUENCE: nice_date = date2string(yyyymmdd) 12 ; 13 ; INPUTS: yyyymmdd the date in the format 14 ; yearyearyearyearmonthmonthdayday 10 ; @param yyyymmdd {in}{required} the date in the format yyyymmdd 15 11 ; 16 ; KEYWORD PARAMETERS:those of string fonction to specify the 17 ; format of the month (the C format) 12 ; @file_comments keyword parameters of string function to specify the format of the month (the C format) can be used 18 13 ; 19 ; OUTPUTS:a string containing the date in a easy readable format14 ; @returns a string containing the date in a easy readable format 20 15 ; 21 ; COMMON BLOCKS:none 22 ; 23 ; SIDE EFFECTS:? 24 ; 25 ; RESTRICTIONS:? 26 ; 27 ; EXAMPLE: 16 ; @examples 28 17 ; 29 18 ; IDL> print, date2string(19900123) … … 32 21 ; JAN 23, 1990 33 22 ; 34 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)23 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 35 24 ; Creation ??? 36 25 ; update/review June 2005 Sebastien Masson. -
trunk/SRC/Calendar/daysinmonth.pro
r9 r93 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:daysinmonth6 5 ; 7 ; PURPOSE:give the nomber of days in a specefic month6 ; give the number of days in a specific month 8 7 ; 9 ; CATEGORY: calandar8 ; @categories calendar 10 9 ; 11 ; CALLING SEQUENCE: ndays = daysinmonth([month[, year]])12 10 ; 13 ; INPUTS (optionnal): month and year. Year is used only if the 14 ; common variable key_caltype = 'greg'. In that case, month 15 ; and year must have the same number of elements. if not 16 ; provided, we take month and year from "time" common variable. 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. 15 ; If not provided, we take month and year from "time" common variable. 17 16 ; 18 ; KEYWORD PARAMETERS:17 ; @returns number of days in a month or -1 in case of error 19 18 ; 20 ; OUTPUTS: 19 ; @uses cm_4cal 20 ; 21 ; @examples 22 ; IDL> ndays = daysinmonth(2, 2000) 21 23 ; 22 ; COMMON BLOCKS: cm_4cal 23 ; 24 ; SIDE EFFECTS: return -1 in case of error 25 ; 26 ; RESTRICTIONS: 27 ; 28 ; EXAMPLE: 29 ; 30 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 24 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 31 25 ; 2/7/98 32 26 ; update/review/english/new commons: June 2005 Sebastien Masson. -
trunk/SRC/Calendar/jul2date.pro
r69 r93 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME: jul2date6 5 ; 7 ; PURPOSE:gives yyyymmdd date equivalent of a julian day6 ; gives yyyymmdd date equivalent of a julian day 8 7 ; 9 ; CATEGORY:calendar8 ; @categories calendar 10 9 ; 11 ; CALLING SEQUENCE: date = jul2date(jday)10 ; @param jday {in}{required} julian day 12 11 ; 13 ; INPUTS:jday: julian day12 ; @returns date in yyyymmdd format 14 13 ; 15 ; KEYWORD PARAMETERS: None 16 ; 17 ; OUTPUTS: date in yyyymmdd format 18 ; 19 ; COMMON BLOCKS: None 20 ; 21 ; SIDE EFFECTS: 22 ; 23 ; RESTRICTIONS: 24 ; 25 ; EXAMPLE: 14 ; @examples 26 15 ; 27 16 ; IDL> print, jul2date(julday(12,23,1999)) 28 17 ; 19991223 29 18 ; 30 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr)19 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 31 20 ; June 2005 32 21 ;- -
trunk/SRC/Calendar/leapyr.pro
r9 r93 1 1 ;----------------------------------------------------------------- 2 function leapyr, year3 2 ;+ 4 ; NAME: leapyr5 3 ; 6 ; PURPOSE:determine whether the input year is a leap year or not7 ; 8 ; 4 ; determine whether the input year is a leap year or not 5 ; Very useful for finding number of days in a year. 6 ; eg. NUM_DAYS_IN_YR = 365 + leapyr(year) 9 7 ; 10 ; CATEGORY: Utility8 ; @categories calendar 11 9 ; 12 ; CALLING SEQUENCE: result = leapyr(year)10 ; @param year {in}{required} year to be tested as a leap year 13 11 ; 14 ; INPUTS: year = test if year is a leap year 12 ; @returns 0 then not a leap year 13 ; 1 then year is a leap year 15 14 ; 16 ; OUTPUTS: result = 0 then not a leap year 17 ; = 1 then year is a leap year 15 ; @uses cm_4cal 18 16 ; 19 ; COMMON BLOCKS: cm_4cal 17 ; @examples 18 ; IDL> result = leapyr(2000) 20 19 ; 21 ; SIDE EFFECTS: 22 ; none. 23 ; MODIFICATION HISTORY: 20 ; @history 24 21 ; 25 ; 26 ; 22 ; Originally Written by: Trevor Harris, Physics Dept., University of Adelaide, 23 ;20/09/88 27 24 ; 28 25 ; November 2004: correction for century years... S. Masson; … … 40 37 ;- 41 38 ;------------------------------------------------------------ 39 function leapyr, year 42 40 ; include commons 43 41 @cm_4cal 44 ;------------------------------------------------------------45 42 yr = long(year) 46 43 IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' -
trunk/SRC/Calendar/monthname.pro
r9 r93 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:monthname6 5 ; 7 ; PURPOSE:gives the name of a month6 ; gives the name of a month 8 7 ; 9 ; CATEGORY: 8 ; @categories calendar 9 ; 10 ; @param number {in}{required} the month number (from 1 to 12) 10 11 ; 11 ; CALLING SEQUENCE:name=monthname(number) 12 ; 13 ; INPUTS: number, the month number (from 1 to 12) 12 ; @file_comments keyword parameters of string function to specify the format of the month (the C format) can be used. 14 13 ; 15 ; KEYWORD PARAMETERS:those of string fonction to specify the 16 ; format of the month (the C format) 14 ; @returns the month's name 17 15 ; 18 ; OUTPUTS: an integer, the month's name 16 ; @examples 17 ; IDL> name=monthname(2) 19 18 ; 20 ; COMMON BLOCKS:None 21 ; 22 ; SIDE EFFECTS: 23 ; 24 ; RESTRICTIONS: 25 ; 26 ; EXAMPLE: 27 ; 28 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) 19 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 29 20 ; 1 October 2001 30 21 ;-
Note: See TracChangeset
for help on using the changeset viewer.