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.
Utilities
The program returns a list of months as a string or string array, depending upon which keywords are set.
index: in, required, type=integer
The index of the month you are interested in returning. An integer or
integer array from 1 to 12.
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.
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.
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.
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.
Here is how to use this program::
IDL> Print, cgMonths([2,4,6], /FirstLetter, /Abbreviation)
Feb Apr Jun
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
Change History:: Written, 8 Nov 2007 by David W. Fanning.
Copyright (c) 2007-2013, Fanning Software Consulting, Inc.