Message Boards Message Boards

2
|
4171 Views
|
1 Reply
|
5 Total Likes
View groups...
Share
Share this post:
GROUPS:

Creating a list of dates

Posted 12 years ago
I'm using the following code to create a list of dates:
DateString[#, {"MonthNameShort", ". ", "DayShort"}] & /@
DayRange[{thisyear}, {thisyear, 12, 31}]
How can I change the elements of DateString so that on the first of the month, it only shows the MonthNameShort, and on subsequent days of a month it shows the DayShort?
POSTED BY: Elizabeth Shack
DateString[#,
   If[#[[3]] == 1, {"MonthNameShort", ". ", "DayShort"},
    "DayShort"]] & /@ DayRange[{thisyear}, {thisyear, 12, 31}]
POSTED BY: Jeremy Michelson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract