Re: why doesn't month take an int ?
John Reppy <[email protected]>
| Newsgroups | gmane.comp.lang.sml.smlnj |
|---|---|
| Message-ID | <[email protected]> |
We used a datatype because it provides symbolic names and is more type secure. For years and days, you need an int. I'm not sure what the right semantics for mapping to/from integers should be. Normal convention would have January be 1, but if you are using the values to index addays, then you want January to be 0. - John On Apr 11, 2006, at 12:01 AM, brian wrote: > In the Date structure, every field except for month takes an int. > > Why is that ? And since it takes the Month datatype, why not > provide a function which maps from int to datatype month. > > Seems inconsistent. > > Is there a reason for the particular organization ? > > Thanks > > Brian > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the > live webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Smlnj-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/smlnj-list > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642