mProjectsCode / mProjectsCode/obsidian-meta-bind-plugin
View field type(s) for dates and durations
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
Please fill out these Check-boxes
- I checked for existing similar feature requests
- I have read the docs and checked that the feature I am requesting is not already implemented
- My feature request consists of only one feature
Is your Feature Request related to a Problem or Annoyance?
I need to show some computed duration inline.
Previously I was using Dataview, but as I'm migrating to Datacore, I'm looking for better alternatives for other features missing in Datacore.
Inline Dataview example:
= durationformat(date("2025-10-25") - date(today), "'in' d 'days'")
Time-related stuff seems very handy for planning and organization, so lacking support in Meta Bing seems like a serious omission.
math.js seems only good for simple units and idk if it can be extended to work with date/duration naturally.
On top of that, there are already multiple input field types for date/time, but no way to do anything with them on the view side.
Describe the Feature you'd like
View field type for dates/durations, or two separate field types.
May use something like Luxon underneath.
Inputs: should understand (can parse) dates from date input fields, date/string properties. Extra handy if property values like [[2025-10-10]] (links to daily notes) can be parsed.
New date construction: should allow both exact date specification and natural relative definitions (now, today, yesterday, tomorrow...).
Expressions: should allow some date/time calculations (shifted date, duration between dates, ...)
Output: should allow to be presented using existing date/time widgets or formatted into a string using custom format string.
Challenges:
- Luxon has no ready to use expression parser like in math.js and no parsing from natural strings;
- dates and durations are two separate types that form an affine space. Existing view field grammar will likely require some compromise or added complexity to allow expressions with them.
Alternatives
Keep using Dataview.
It is being superseded by Datacore.
Dataview inline fields have some limitations.
Datacore might get its own inline fields support someday, but that's uncertain.
View field type that uses Datacore query evaluation - I don't know whether it is exposed for use by other plugins.
Some permanent extensions for math.js that would allow to work with dates as numbers in Unix time format and allow necessary formatting?
Multiline code blocks to implement my own formatting logic like shown in #584 - not an option. I need simple inline fields.
Additional Context
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reviewing the existing view-field grammar and date/time input field handling, then determine how date and duration parsing, expressions, and formatting could fit; done would mean documented support for the requested inputs, calculations, and outputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100