Ticket #596 (closed Bug: fixed)

Opened 5 months ago

Last modified 5 months ago

date::timespan_string() -- remove 'ago' and don't expect array output

Reported by: brettalton Owned by: Shadowhand
Priority: minor Milestone: 2.2
Component: Core Version: SVN HEAD
Keywords: Cc:

Description (last modified by Shadowhand) (diff)

http://trac.kohanaphp.com/browser/trunk/system/helpers/date.php?rev=2657

First: date::timespan_string() runs date::timespan() and expects it to be an array output, but this is not always the case: http://trac.kohanaphp.com/browser/trunk/system/helpers/date.php?rev=2657#L349

Secondly: date::timespan_string() returns the concatenate string 'ago' to its output. This is incorrect because I have a similar function for my websites and use it to determine time in the future. I also like to use my own terms, such as 'remaining'.

Change History

Changed 5 months ago by Shadowhand

  • status changed from new to assigned
  • description modified (diff)

Read the function closer... it does not expect an array of output, it explicitly checks it.

Changed 5 months ago by Shadowhand

  • status changed from assigned to closed
  • resolution set to fixed

"ago" removed in r2658.

Note: See TracTickets for help on using tickets.