Skip to content

fix: modify to run with @pinojs/dateformat#614

Draft
Uzlopak wants to merge 4 commits intopinojs:dateformatfrom
Uzlopak:patch-1
Draft

fix: modify to run with @pinojs/dateformat#614
Uzlopak wants to merge 4 commits intopinojs:dateformatfrom
Uzlopak:patch-1

Conversation

@Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Aug 7, 2025

@jsumners
I am not maintainer here, so I could not push into your branch.

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Aug 7, 2025

Basically SYS: is the same as GMT. I could just modify our dateformat to even avoid that slice(4) call.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any technical reasons @pinojs/dateformat is not a drop-in replacement for dateformat?

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Aug 7, 2025

@jsumners

No, it was an accidental typo.

@jsumners
Copy link
Member

jsumners commented Aug 7, 2025

@jsumners

No, it was an accidental typo.

Sorry. I don't follow. I expected the only changes necessary would be replacing every occurrence of require('dateformat') with require('@pinojs/dateformat'). That does not seem to be the case. Are there technical reasons for this?

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Aug 7, 2025

No, there are no technical reasons. I made a mistake, by making a capital F instead of a lowercase f. I will fix it. I am just currently commuting... I provide you with a fix in fee hours

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Aug 8, 2025

@jsumners
done

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Aug 11, 2025

@mcollina
@jsumners

Please review again.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm once our dateformat method hits 1.0.0

@Uzlopak Uzlopak marked this pull request as draft August 11, 2025 15:45
@Uzlopak
Copy link
Contributor Author

Uzlopak commented Aug 11, 2025

Changing this PR to draft. Will get back to it some day.

@jsumners
Copy link
Member

jsumners commented Oct 8, 2025

I'm going through our modules in alphabetical order and getting the updated for pino@10/dropping Node v18. I've made it down to pino-caller, so I'm still a ways away from getting to this one. But I'd like to see this get resolved before I get there. Do you have time to address this?

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Oct 8, 2025

yes, i will take care of it today.

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Oct 13, 2025

@jsumners

wdyt of this in combination with pinojs/dateformat#5 `

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Oct 13, 2025

So.. modified this PR to use only the improved dateformat function and not the DateFormatter from pinojs/dateformat.

It is not the implementation for high performance, as for that you should instantiate the dateformatter. But this change should be already faster than the original dateformat function.

If we one day have interest in more performance, we then only need to use DateFormatter.

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.

3 participants