GithubHelp home page GithubHelp logo

Comments (5)

quanru avatar quanru commented on August 19, 2024 1

@zhousihan77 已修复,请更新 1.7.9

from obsidian-lifeos.

quanru avatar quanru commented on August 19, 2024

TaskRecordListByTime 是指本周的日记文件中记录的任务,这样还有问题吗?

from obsidian-lifeos.

zhousihan77 avatar zhousihan77 commented on August 19, 2024

感谢你的回答,还是有一点问题:

“本周的日记文件中记录的任务”

这个本周是指当前时间还是周记的文件时间呢?比如现在是2024的第一周,此时新建的2024-W2周记,显示的应该是第一周还是第二周的任务呢?

在2024-01-08这天新建的2024-W2周记,显示的还是W1的任务,ProjectListByTime显示的也是上周的项目耗时。

from obsidian-lifeos.

quanru avatar quanru commented on August 19, 2024

所有的时间都是当前文件名的时间,和你哪一个时刻创建无关

from obsidian-lifeos.

zhousihan77 avatar zhousihan77 commented on August 19, 2024

看起来似乎是这段代码转换week number的问题。单击日历栏生成的周记文件中,第1-9周的week number是一位数字,没办法通过W(\d{2})/)提取。

parse(path = ''): DateType {
const fileName = this.app.vault.getAbstractFileByPath(path)?.name;

const [[, year], [, quarter], [, month], [, week], [, day]] = [
  fileName?.match(/(^\d{4})/) || [], // year
  fileName?.match(/^\d{4}-Q(\d{1})/) || [], // quarter
  fileName?.match(/^\d{4}-(\d{2})/) || [], // month
  fileName?.match(/^\d{4}-W(\d{2})/)|| [], // week
  fileName?.match(/^\d{4}-\d{2}-(\d{2})/) || [], // day
];

from obsidian-lifeos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.