Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Added Minute and Hour (singular) to date expression
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchisari authored and The Appleseed Project committed Oct 17, 2010
1 parent 0ce0350 commit ebb4ae5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions languages/default/en-US/_system/global.lang
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ ALL_PAGES="All"

[time]
TIME_IN_SECONDS_AGO="%seconds$s seconds ago"
TIME_IN_MINUTE_AGO="%minutes$s minute ago"
TIME_IN_MINUTES_AGO="%minutes$s minutes ago"
TIME_IN_HOUR_AGO="%hours$s hour ago"
TIME_IN_HOURS_AGO="%hours$s hours ago"
TIME_FULL_AM="%day$s/%month$s/%year$s %minute$s:%second$sam"
TIME_FULL_PM="%day$s/%month$s/%year$s %minute$s:%second$spm"
Expand Down
4 changes: 4 additions & 0 deletions libraries/date.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ public function Format ( $pStamp, $pVerbose = false ) {

if ( $seconds < 60 ) {
$formatted = __( "Time In Seconds Ago", array ( "seconds" => $seconds ) );
} else if ( $minutes == 1 ) {
$formatted = __( "Time In Minute Ago", array ( "minutes" => $minutes ) );
} else if ( $minutes < 60 ) {
$formatted = __( "Time In Minutes Ago", array ( "minutes" => $minutes ) );
} else if ( $hours == 1 ) {
$formatted = __( "Time In Hour Ago", array ( "hours" => $hours ) );
} else if ( $hours < 24 ) {
$formatted = __( "Time In Hours Ago", array ( "hours" => $hours ) );
} else if ( $days < 365 ) {
Expand Down

0 comments on commit ebb4ae5

Please sign in to comment.