Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toon "Last modified" ook (dat is meestal interessanter dan "Last created") #3

Open
roelvangils opened this issue Feb 23, 2022 · 3 comments
Assignees

Comments

@roelvangils
Copy link
Member

20220223_144429_Google Chrome

En als je dan bezig bent, je hebt in Protoblast een functie om relatieve data te tonen. Misschien leuk om dat ook te gebruiken?

Dus, ipv. 22-02-23 14:47:33 kan dat dan zijn: "Today at 14:47". En ook voor Yesterday. En anders gewoon: "February 20, 2022 at 15:45" etc.

Maar het sorteren mag daardoor niet breken natuurlijk.

@roelvangils roelvangils changed the title Toon "Last modified" ook (dat is belangrijker dan "Last created" Toon "Last modified" ook (dat is meestal interessanter dan "Last created") Feb 23, 2022
@skerit
Copy link
Member

skerit commented Oct 4, 2023

@roelvangils

Good idea. Can I make it all relative by default?
So it'll say 7 months and 17 days ago for dates longer in the past.

I've changed it so by default, Date and Datetime fields will now use this relative format.
It can be changed per-field too:

This sets it to something like Thursday 2nd November 2023:

list.addField('created', {date_format: 'l jS F Y'});

This will look like the old default format: 2023-11-03 16:23:

list.addField('created', {date_format: 'Y-m-d H:i'});

skerit added a commit to 11ways/alchemy-form that referenced this issue Oct 4, 2023
@skerit
Copy link
Member

skerit commented Oct 4, 2023

Also: these fields always have to be coded manually, so it's a choice per model to display the created or updated time, not just something chimera does.

@roelvangils
Copy link
Member Author

Good idea. Can I make it all relative by default? So it'll say 7 months and 17 days ago for dates longer in the past.

I wouldn't do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants