allow locale format for date

Bug #1062659 reported by Nimit Shah on 2012-10-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Getting Things GNOME!
Wishlist
Nimit Shah

Bug Description

In India we use dd-mm-yyyy date format.
It would be easier for Indians if this format is also allowed in GTG especially in quickadd bar.

This would cause changes in quickaddbar regex, date checking script in task editor, due-date and start-date fields in task browser.

Related branches

Nimit Shah (nimit-svnit) on 2012-10-06
description: updated
Izidor Matušov (izidor) wrote :

You are welcome to write patch for it which would accept date based on your locale. There is already some code for that in GTG/tools/dates.py You could either accept the local format or US International format yyy-mm-dd

Changed in gtg:
status: New → Confirmed
assignee: nobody → Nimit Shah (nimit-svnit)
Nimit Shah (nimit-svnit) wrote :

I have shared a patch which lets you add dates in your locale. I have tested it with quick-add entries and editor. It works properly for both of them.

Changed in gtg:
status: Confirmed → In Progress

Thanks for the patch,. It would easier though to perform the review process if you could actually create a branch and ask for a merge.

If I'm not mistaken, your patch introduces a format where slashes ("/") are used as separator. So dates introduced following the locale will use "/" and dates using US international format will use hyphens ("-"). Could you make it so that the user could use either ones, so as to reduce confusion?

Also, could you update the documentation? (both from the method and in doc/userdoc/C/gtg-quickadd-dates.page)

Izidor Matušov (izidor) wrote :

The patch looks good to me.

Bertrand> There might be used slashes in your locales as a separator. It depends always on user's locales.

Nimit > Nevertheless, could you please update the documentation?

Bertrand>I have updated the documentation in quickadd dates. Which other
document do I need to update?

PS: The reason for patch , as I might have told you earlier, is that SSH
connection is blocked in my college. I will not be going home for another
2 weeks and hence I had to submit a patch.

Nimit Shah,
B Tech 4th year,
Computer Engineering Department,
SVNIT Surat
www.dude-says.blogspot.com

On Tue, Oct 9, 2012 at 4:29 PM, Izidor Matušov <email address hidden>wrote:

> The patch looks good to me.
>
> Bertrand> There might be used slashes in your locales as a separator. It
> depends always on user's locales.
>
> Nimit > Nevertheless, could you please update the documentation?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1062659
>
> Title:
> allow dd-mm-yyyy format for date
>
> Status in Getting Things GNOME!:
> In Progress
>
> Bug description:
> In India we use dd-mm-yyyy date format.
> It would be easier for Indians if this format is also allowed in GTG
> especially in quickadd bar.
>
> This would cause changes in quickaddbar regex, date checking script in
> task editor, due-date and start-date fields in task browser.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gtg/+bug/1062659/+subscriptions
>

Izidor> Yes, indeed. In Belgium, the locale is typically %d/%m/%Y. However, the documentation on quickadd bar says the following:

"Dates can be formatted as yyyy-mm-dd (for example 2012-04-01) "

If we add something like: "The quickadd bar also supports regional format, so you can also give a date in you local form.", which is more or less the only bit of documentation we can give about this (since we obviously cannot provide the locally configured format in the documentation).

I fear that it could create some slight confusion, because I might be tempted, on my computer, to write dd-mm-yyyy, thinking that GTG considers "-" as the separator. Indeed, Internet made me used to consider all sort of separators for dates (even on belgian sites), so it's absolutely not clear for me that I should use "/" instead of "-". Hence my suggestion to interpret the date independently of a particular separator.

Now, it might be technically tricky, because I see no easy way to get the date separator from the locale. Thus, feel free to discard this request if it's too complicated.

Nimit> As far as I know, you have to update the method documentation, GTG documentation page about quickadd bar: doc/userdoc/C/gtg-quickadd-dates.page, and the tutorial tasks: GTG/core/firstrun_tasks.py

Nimit Shah (nimit-svnit) wrote :

Please forgive me for not coming up with better words for first_run tasks and user docs.

Nimit Shah (nimit-svnit) on 2012-10-13
summary: - allow dd-mm-yyyy format for date
+ allow locale format for date
Nimit Shah (nimit-svnit) wrote :

Since it is already solved, targeting it to 0.3.1

Changed in gtg:
milestone: 0.4 → 0.3.1
Izidor Matušov (izidor) on 2012-11-22
Changed in gtg:
status: In Progress → Fix Committed
Nimit Shah (nimit-svnit) on 2013-11-25
Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers