Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changes between Version 26 and Version 27 of BreakingChanges994

Show
Ignore:
Author:
kris (IP: 67.127.58.77)
Timestamp:
12/18/07 07:22:32 (16 years ago)
Comment:

updated with Time changes

Legend:

Unmodified
Added
Removed
Modified
  • BreakingChanges994

    v26 v27  
    3030 
    3131== Time Representation == 
    32  * The tango.util.time package has been restructured and moved. The package now resides in tango.time instead of tango.util.time, per the request of many users. See [http://dsource.org/projects/tango/wiki/ChapterDateTime this page] for updated documentation 
     32 * The tango.util.time package has been restructured and moved. The package now resides in tango.time instead of tango.util.time, per the request of users. See [http://dsource.org/projects/tango/wiki/ChapterDateTime this page] for updated documentation. Oft-used data structures have all been placed within one module called tango.time.Time 
    3333 
    3434 * tango.core.Type has been removed, which means Interval and the original Time type no longer exist. Any place that used Interval in tango.core.* for timing purposes (sleeping, waiting, etc.) now takes a double instead. This is what Interval used to represent, so the semantics have not changed here. 
    4040 * !DateTime was migrated to the Time type.   
    4141 
    42  * tango.time.Time is now used only to represent points in time.  Differences between two Time points are now represented by a !TimeSpan.  This is reflected in the return values and parameters of the Time math operators.  For example, you can no longer add 2 Time values together, but you can add a Time and a !TimeSpan.  Many of the Time.addXXX functions have been deprecated or removed.  Instead you should use x += !TimeSpan.XXX.  For example: 
     42 * Time is now used only to represent points in time.  Differences between two Time points are now represented by a !TimeSpan.  This is reflected in the return values and parameters of the Time math operators.  For example, you can no longer add 2 Time values together, but you can add a Time and a !TimeSpan.  Many of the Time.addXXX functions have been deprecated or removed.  Instead you should use x += !TimeSpan.XXX.  For example: 
    4343{{{ 
    4444#!d 
    6767 * Calendar functions in the original !DateTime have been removed from the new Time type.  This is to reduce the duplication of code in Time and Calendar.  The Time type has accessors for the components of the time of day (as illustrated above), but other Calendar-like components should be accessed through Calendar's methods.  For example, to get the year a Time represents, use the {{{Calendar.getYear(Time)}}} function. 
    6868 
    69  * tango.time.chrono.!DefaultCalendar has been added.  This contains a single global instance of a calendar, called !DefaultCalendar.  This instance represents the current default calendar that the library is using.  Any functions or classes that use a calendar but are not given one will use this calendar instead.  It defaults to a !GregorianCalendar.  You can change it to something else if you wish.  You can use it as a shortcut to your preferred calendar.  So instead of {{{GregorianCalendar.getDefaultInstance.getYear(Time)}}} you can type {{{DefaultCalendar.getYear(Time)}}}. 
    70  
    7169 * Time.min is now negative, and there's a new Time.epoch representing what ''min'' used to be.  The library will appropriately handle negative times as we move forward. 
    7270