question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Weekly Notes confusing week number

See original GitHub issue

Its Sat Feb 19. When I create a weekly note:

  1. The note file name is W06
  2. The Calendar highlights it on last week which is W07
  3. This week in the calendar is actually W08 image

This is my note name: YYYY/[Weekly]/gggg-[W]WW

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
stefandesucommented, Apr 12, 2022

I rewrite your code to work even when creating a weekly note for a future or past week:

[[<% tp.date.weekday("gggg-[W]WW", -7, tp.file.title, "gggg-[W]WW") %>]] <== This Week ==> [[<% tp.date.weekday("gggg-[W]WW", 7, tp.file.title, "gggg-[W]WW") %>]]

Requires that the note is named accordingly of course, e.g. 2022-W15.

1reaction
datavisticscommented, Apr 11, 2022

@stefandesu that seemed to help!

I used this btw: [[<%tp.date.now("gggg-[W]WW", -9)%>]] <== This Week ==> [[<%tp.date.now("gggg-[W]WW", 2)%>]]

Read more comments on GitHub >

github_iconTop Results From Across the Web

The "show week number" shows wrong week number in 2021
Describe the bug. The week number in 2021-01-01 ~ 2021-01-03 should be "1", but now it shows "53"(count start from year 2020)
Read more >
ISO week date - Wikipedia
The ISO week date system is effectively a leap week calendar system that is part of the ISO ... Not to be confused...
Read more >
Excel WEEKNUM function – convert week number to date and ...
Note. This formula example is based on ISO week numbers, with a week starting on Monday. The formula to return the Start date...
Read more >
Calendar with days in columns; week number and habit tracker
It has a weekly view where there are three columns for days. As for the habit tracker, check the 100-Days-Challenge-Template repo on GitHub....
Read more >
How Do Week Numbers Work? - Time and Date
The weeks of the year in a Gregorian calendar are numbered from week 1 to week 52 or 53, depending on several varying...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found