After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 211122 - automatic calendar events from arbitrary text
automatic calendar events from arbitrary text
Status: RESOLVED OBSOLETE
Product: evolution
Classification: Applications
Component: Mailer
3.2.x (obsolete)
Other other
: Low enhancement
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[cal_mail]
Depends on: 220423 251124
Blocks:
 
 
Reported: 2001-09-27 19:55 UTC by Ben FrantzDale
Modified: 2021-05-19 11:31 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Ben FrantzDale 2001-09-27 19:55:35 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.
Comment 1 Gerardo Marin 2002-12-15 19:48:15 UTC
Ettore: is this feasible?  Is it worth to keep as wishlist?
Comment 2 Gerardo Marin 2003-01-23 18:47:03 UTC
Ettore: ping?
Comment 3 Ben FrantzDale 2003-01-24 04:11:28 UTC
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.
Comment 4 Ben FrantzDale 2006-04-13 06:13:46 UTC
I'd say this must be do-able. Google did it: http://www.google.com/support/calendar/bin/answer.py?answer=36592&topic=8569
Comment 5 Matthew Barnes 2008-03-11 00:29:31 UTC
Bumping version to a stable release.
Comment 6 Matthew Barnes 2008-11-19 10:44:19 UTC
Moving this to Mailer.

Not very likely to happen without outside contribution.  All this would have to support all locales, date formats, etc.
Comment 7 André Klapper 2012-02-14 14:25:49 UTC
Could be based on bug 251124
Comment 8 André Klapper 2021-05-19 11:31:55 UTC
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.