Tags: metatexx/avrox
Tags
Changed the SQL serializer, New (Today) and added Before() and After() - One can either use time.Time or string for Parse() (sql serialize) - One can define the timezone that is used when reading from DB and using time.Timei (sql unserialize) - One can define a "Zero" date conversion when using Parse() with string. - One can define the format that is used with Parse() with string. This allows to use a format like "20060102" which is known to be safe for old MSSQL Servers that switch day and month when using "2006-01-02". - The tests are also run against a sqllite3 in memory database to test many of the above cases. - Changed "Now()" to "Today()" - Added Before() and After() for readability.
Add MonthStart/MonthEnd and NextWeekday/PreviousWeekday funcs (#2) * Add MonthStart and MonthEnd funcs * Add NextWeekday / PreviousWeekday funcs + `MonthEnd()`: Returns a new RawDate representing the last day of the month. + `MonthEnd()`: Returns a new RawDate representing the last day of the month. + `NextWeekday(weekday time.Weekday, orToday bool)`, the function returns the next date that falls on the specified weekday. + `PreviousWeekday(weekday time.Weekday, orToday bool)`, the function returns the previous date that falls on the specified weekday. Both funcs retrun the current day if the 'orToday' parameter is set to true and the current day is the same as the specified weekday.
Change to RawDate based on how we use it. RawDate was changed to have the same property as time.Time with being the date 1.1.1 when the structure gets not initialized. The internal fields are still exported but have an added 0 to indicate that they are not what one may expect and should generally not be used.
PreviousNext