Skip to content

Fix Timer.fmt for short result strings#6

Open
nliviu wants to merge 1 commit intomongoose-os-libs:masterfrom
nliviu:timer_fmt
Open

Fix Timer.fmt for short result strings#6
nliviu wants to merge 1 commit intomongoose-os-libs:masterfrom
nliviu:timer_fmt

Conversation

@nliviu
Copy link

@nliviu nliviu commented Nov 16, 2018

When doing eg. Timer.fmt('%H', Timer.now()) the resulting string is .
Test code:

    let now = Timer.now();
    let hour = Timer.fmt("%H", now);
    print('++++', JSON.stringify({hour: hour}));

Original Timer.fmt output:

{"hour":"  "}

Modified:

{"hour":"20"}

When doing eg. `Timer.fmt('%H', Timer.now())` the resulting string is `  `.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant