Templating: week number in templates should use NP API to get NP week, not isoWeek
Nadie ha tomado este issue todavía.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
There are convenience functions in templates that get the weekNumber, e.g.
weekNumber(pivotDate = '') {
@EduardMe has added functionality to get the NP week number instead, since iso may or may not match what you see in your NP interface, depending on what day you pick for the beginning of a week.
For example, here's how I told a user recently to do it:
---
title: Weekly Note Template Tag
---
Using now/today, no matter where you are, this gives you the current weekly note:
[[<%- Calendar.weekYear(new Date()) %>-W<%- Calendar.weekNumber(new Date()) -%>]]
output: 2022-W49
Using week date (this is the best one if you want the weekly note corresponding to a Calendar note which doesn't have to be today):
[[<%- Calendar.weekYear(Editor.note.date) %>-W<%- Calendar.weekNumber(Editor.note.date) -%>]]
Using title (should normally work as above:
[[<%- Calendar.weekYear(new Date(Editor.note.title)) %>-W<%- Calendar.weekNumber(new Date(Editor.note.title)) -%>]]
@jgclark You deal with these kinds of things more than I do. What other things like weekNumber should be fixed/added to the templating date module to give users access to this info?
- Lenguaje dominante
- JavaScript
- Estrellas
- 204
- Forks
- 82
- Merge medio
- 22 h 27 min
- PR fusionados (30 d)
- 3
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NotePlan/plugins
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
Dashboard: Task "Comment" Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Tidy: Issue with plugin.json Abiertobug
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
Todos los issues de NotePlan/plugins
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bevyengine/bevy-website#2595 ·