.\
cgmonths.pro
top cgMonths
Utilities
result = cgMonths(index [, /FIRSTLETTER] [, /ALLCAPS] [, /ABBREVIATION] [, /LOWCASE])
This is a utility program for obtaining the months of the year in various string formats. It is primarily used for labeling axes on graphics plots.
Return value
The program returns a list of months as a string or string array, depending upon which keywords are set.
Parameters
- index in required type=integer
The index of the month you are interested in returning. An integer or integer array from 1 to 12.
Keywords
- FIRSTLETTER in optional type=boolean default=0
Set this keyword if you wish to return the month as with its first letter capitalized, for example, "August". Keywords may be used in conjunction with other keywords.
- ALLCAPS in optional type=boolean default=0
Set this keyword if you wish to return the month in all capital letters, for example, "AUGUST". Keywords may be used in conjunction with other keywords.
- ABBREVIATION in optional type=boolean default=0
Set this keyword if you wish to return the month as a three letter abbreviation, for example, "aug". Keywords may be used in conjunction with other keywords.
- LOWCASE in optional type=boolean default=0
Set this keyword if you wish to return the month in all lower case letters, for example, "august". Keywords may be used in conjunction with other keywords.
Examples
Here is how to use this program:
IDL> Print, cgMonths([2,4,6], /FirstLetter, /Abbreviation)
Feb Apr Jun
Author information
- Author:
FANNING SOFTWARE CONSULTING:
David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com
- Copyright:
Copyright (c) 2007-2013, Fanning Software Consulting, Inc.
- History:
Change History:
Written, 8 Nov 2007 by David W. Fanning.
File attributes
Modification date: | Fri Mar 27 11:07:36 2015 |
Lines: | 120 |
Docformat: | rst rst |