If it is just padding the 0 for hours I think roll your own is a fine
approach.
Maybe that, short and sound:
("0" + d.getHours()).slice(-2)
​Cheers Roland​
2018-04-17 16:26 GMT+02:00 Stefan Adams <[email protected]>:
>
>
> On Tue, Apr 17, 2018 at 6:40 AM, Sebastian Riedel <[email protected]>
> wrote:
>
>> > Oh great! If I wasn't clear about it, the link I provided is my attempt
>> at
>> > #70.
>> >
>> > https://github.com/s1037989/minion/commit/6bc1ca7a40e8b8e38b
>> a683008aab83fedb2d78af
>>
>> That doesn't quite look right. Are you making all pages poll history data
>> even if they don't need it?
>
>
> This newest commit
> <https://github.com/s1037989/minion/commit/54f4d19dab5f68581418a756f892d2f5ac995569>
> should move the polling to only the dashboard.
>
>
>> And i think you're not padding the hour value
>> with leading zeroes.
>
>
> Correct. How would you prefer I do that? My understanding is that
> javascript doesn't have a native sprintf. Should I use a sprintf library
> <https://github.com/alexei/sprintf.js> or use a snippet from SO
> <https://stackoverflow.com/questions/10073699/pad-a-number-with-leading-zeros-in-javascript>?
> Should I avoid the latter due to copyright issues and should I code my own
> pad function instead?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.