www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13368] New: std.datetime.monthToString should be public

https://issues.dlang.org/show_bug.cgi?id=13368

          Issue ID: 13368
           Summary: std.datetime.monthToString should be public
           Product: D
           Version: unspecified
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: kevin.lamonte gmail.com

I am implementing a logging library and need to convert DateTime.month to a
3-letter month abbreviation, e.g. 0 --> "Jan".  monthToString (which is used by
toSimpleString()) already has this functionality.

Note that to!string(DateTime.month) returns a fully-lowercase month name, which
is not what I need.

Making monthToString public would also give one easy access to "January",
"February", etc.

--
Aug 24 2014