Skip to content

[My Daily Log] Fix timestamp for entries to zero-padded minutes/seconds #5355

Closed

Description

@urbansheep

Extension

https://www.raycast.com/frugoman/my-daily-log

Description

Current version of the extensions inserts timestamps without extra formatting, which leads to strange looking strings like 9:1:5 (instead of 9:01:05 or 09:01:05).

I fixed it at my local fork by adding .toString().padStart(2, '0') to minutes and seconds in the getHourAndMinute(), but maybe there's a better way.

It would be ideal if the string formatting was customizable (time/date separators, seconds or no seconds, markdown decorations like italic/bold, separator between the timestamp and the entry text itself). But having correct minutes/seconds formatting is the major fix for the daily use.

Who will benefit from this feature?

No response

Anything else?

No response

Activity

  1. added
    extension
    feature request
    on Mar 14, 2023
  2. added
    extension: my-daily-log
    on Mar 14, 2023
  3. raycastbot commented on Mar 14, 2023

    @raycastbot
    Collaborator

    Thank you for opening this issue!

    🔔 @frugoman you might want to have a look.

    💡 Tip: Once the issue is resolved, comment @raycastbot close this issue to close it.

  4. frugoman commented on Mar 15, 2023

    @frugoman
    Contributor

    @urbansheep Hi! thanks for raising this! could you attach a screenshot? I do not see that behaviour on my end

  5. frugoman commented on Mar 15, 2023

    @frugoman
    Contributor

    Hey @urbansheep, I think you may be talking about the format in the file itself!

    I've rewritten the entire thing to store json now, so that more data can be stored in an easier to manage way. This changes should help with what you describe!

    #5389

    stay tunned to it being merged soon!

  6. urbansheep commented on Mar 20, 2023

    @urbansheep
    Author

    Well, switching over to json definitely makes it more flexible (and solves the issue with formatting), but now daily log became raycast-bound.

    Previous approach (appending a line to markdown file) allowed me to use it as way to update my daily log in the Obsidian vault. It seems I will have to find another way to manage this if I don't want to edit daily log json file by hand (and I don't).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensionextension: my-daily-logfeature request

    Type

    No type

    Fields

    Priority

    None yet

    Severity

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions