GNOME Bugzilla – Bug 211122
automatic calendar events from arbitrary text
Last modified: 2021-05-19 11:31:55 UTC
Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: I suggested this on the mailing list: I'm not sure what the best UI would be but... Suppose I get an email with the folowing text: ``The meeting will be at 3 next Monday'' I would like to be able to select this text and have a context-menu entry of ``add to calendar.'' This would first popup a dialog to create a new calendar entry could be used, with the date of Monday, October 1, 2001 and a time of 3PM. The text of the event could be the entire string or just ``the meeting will be at'' or something even more clever. BACKEND: The core of this would be a function that took a string as input and returned a date, time, and comment. It would need to do a fair ammount of smart pattern matching. Some cases to look for would be: ``next [day of week]'' ``09/30/2001'' or ``9/30/01'' or ``9/30'' or ``the 30th'' or ``sunday'' ``noon'' or ``12'' or ``12pm'' A simple and useful start would be a function that simply matched for (in perl): if ($input =~ /(\d{1,2})\/(\d{1,2})(\/\d{2,4}){0,1}/ ) { #get 1/1 or 1/1/02 $month = $1; $day_of_month = $2; $year = &get_four_digit_year($3); } elsif ($input =~ /($monthregexp)\W{1,3}(\d{1,2})/i ) { #get english date $month = &get_numeric_month($1); $day_of_month = $2; if ($month >= $this_month) { $year = $this_year; } else { $year = $this_year+1; } } #Next quickly do time range: $timeregexp = "\\d+\\s{0,1}(am|pm|a|p)"; if ($input =~ /($timeregexp)((\s+\-\s+|\s+to+\s+)($timeregexp)){0,1}/i ) { $startime = &time_from_string($1); if ($4) { $endtime = $4; } } UI: *If ``events'' could be identified accurately, a button or hyperlink could be displayed in the message. This would be cool if and only if it worked very well. *Instead of popping up an add event dialog, a wizard might be better to force the user to serialize his/her checking that the date and time is correct.
Ettore: is this feasible? Is it worth to keep as wishlist?
Ettore: ping?
I'm not sure how much crazyness should be supported -- probably not too much -- but some simple things would be very helpful and quite doable. A simplified list would be: today tomorrow monday, tuesday, etc. Also, even if none of this is added, the value entered in the field should be verified as soon as the user unfocuses the widget. As is, I can leave "today" in that field and I'm not told it's a problem untill I click "Save and Close" at which point I'm not thinking about when the event is.
I'd say this must be do-able. Google did it: http://www.google.com/support/calendar/bin/answer.py?answer=36592&topic=8569
Bumping version to a stable release.
Moving this to Mailer. Not very likely to happen without outside contribution. All this would have to support all locales, date formats, etc.
Could be based on bug 251124
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines and create a new enhancement request ticket at https://gitlab.gnome.org/GNOME/evolution/-/issues/ Thank you for your understanding and your help.