Greetings,

I suggest two tweaks to output that would be nice:

1) do not zero pad the %days%. %hours%, %mins%, %secs% replacements, or provide an additional replacement key that doesn't zero pad. Right now output like "188 days, 01 hours and 05 minutes away" looks a little funny (to non-programmers) with zero padding.

2) Using the same example above, can you provide a replacement pattern that would correctly choose plural forms for each element? For example, %hours_str% which could either output "hour" or "hours" based on whatever %hours% would output.

End result from both these tweaks would be output like: "188 days, 1 hour and 5 minutes away", which looks a little more polished.

Thank you for the module!

Comments

jvandervort’s picture

Assigned: Unassigned » jvandervort
Status: Active » Fixed

I added 3 new non-padded replacements:

%hours_nopad%
%mins_nopad%
%secs_nopad%

to tonights dev snapshot.

Once you upgrade you'll need to go to the admin screen and hit 'save' to regenerate the js file.

Let me know how it works.

jvandervort’s picture

Also I added plurals/singular when you have

%years% years
%hours% hours
%mins% minutes
etc...

which is automatically non-padded and the units are correctly pluralized.

NOTE: You don't use the special _nopad items above. If you have the units following
the tokens it assumes there should be no padding.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.