mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2026-03-24 04:46:56 +00:00
[GH-ISSUE #8567] [FR] Add relative date format ('2 days ago', 'in 3 hours') for date fields #3912
Labels
No labels
2024
2025
2026
acct mgmt
AI
automation
bug
calendar
ci
CJK
cloud
code-block
collaboration
copy-paste
database
data migration
data sync
deploy
desktop
develop
develop
documentation
duplicate
editor
editor-plugin
emoji
export
files
flutter-only
follow-up
formula
good first issue for devs
good first issue for experienced devs
grid
hacktoberfest
HACKTOBERFEST-ACCEPTED
help wanted
i18n
icons
images
importer
improvements
infra
install
integrations
IR
kanban board
login
look and joy
mentorship
mobile
mobile
needs design
new feature
new feature
non-coding
notes
notifications
onboarding
organization
P0+
permission
platform-linux
platform-mac
platform-windows
plugins
program
pull-request
Q1 25
Q1 26
Q2 24
Q2 25
Q3 24
Q3 25
Q4 24
Q4 25
react
regression
rust
rust
Rust-only
Rust-only
Rust-starter
Rust-starter
self-hosted
shortcuts
side panel
slash-menu
sync v2
table
tablet
task
tauri
templates
tests
themes
translation
v0.5.6
v0.5.8
v0.5.9
v0.6.0
v0.6.1
v0.6.4
v0.6.7
v0.6.8
v0.7.1
v0.7.4
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.8.0
v0.8.4
v0.8.5
v0.8.9
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AppFlowy-IO/AppFlowy#3912
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @diegodurs on GitHub (Mar 12, 2026).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/8567
Description
Add a Relative date format option to date/datetime fields that displays timestamps as human-readable relative time (e.g., "2 days ago", "in 3 hours", "just now") instead of absolute dates.
This is useful for task management, project tracking, and any workflow where recency matters more than the exact date — similar to how GitHub, Slack, and most modern tools display timestamps.
Current behavior
Date fields support 6 absolute format variants:
There is no option to display dates relative to the current time.
Proposed behavior
Add a new
DateFormat::Relativevariant (value6) that renders timestamps as:The exact timestamp should still be visible on hover (tooltip).
Implementation plan
This is a full-stack feature touching 3 repositories:
1. AppFlowy-Collab (Rust — source of truth)
collab-database/src/fields/type_option/date_type_option.rsRelative = 6to theDateFormatenumFrom<i64>conversionformat_str()— relative dates can't use a static chrono format string, sostringify_cell/formatted_date_time_from_timestampneed to compute the diff againstchrono::Utc::now()(or local time with timezone offset)chrono::Durationfor the delta calculation2. AppFlowy (Flutter + Rust)
frontend/rust-lib/flowy-database2/src/services/field/type_options/date_type_option/): Update protobufDateFormatPBenum, handle the new variant in formatting logicfrontend/appflowy_flutter/lib/workspace/application/settings/date_time/date_format_ext.dart): Add display name for the format ("Relative")frontend/appflowy_flutter/lib/plugins/database/widgets/field/type_option_editor/date/date_time_format.dart): Include in the dropdownStreamBuilderwith periodic ticks would work.3. AppFlowy-Web (React/TypeScript)
src/application/types.ts): AddRelative = 6to theDateFormatenumsrc/utils/time.ts): AdddayjsrelativeTimeplugin, updategetDateFormat()/renderDate()to usedayjs().to(timestamp)when format is Relativesrc/components/database/components/cell/date/DateTimeCell.tsx): Add tooltip showing absolute date, periodic re-render viauseEffect+ intervalsrc/components/database/components/property/date/DateTimeFormatGroup.tsx): Add "Relative" option to the dropdownKey design considerations
dayjsandchrono-humanizeboth support this.Impact
Anyone using AppFlowy for task management, project tracking, CRM, or content calendars — where knowing "this was 3 days ago" is more useful than "this was March 9, 2026".
Additional context
dayjs(already used in AppFlowy-Web) has arelativeTimeplugin that handles this wellchrono-humanizecrate provides similar functionalitytimeagopackage is a mature solutionI'm willing to contribute this feature. Happy to start with a PR to AppFlowy-Collab + AppFlowy-Web as a first pass.