date format modified for the 'Go To' command
This commit is contained in:
parent
68de892ad9
commit
650ac9dfe7
@ -1,4 +1,4 @@
|
||||
/* $calcurse: calendar.c,v 1.3 2006/11/02 13:42:48 culot Exp $ */
|
||||
/* $calcurse: calendar.c,v 1.4 2006/12/10 14:51:41 culot Exp $ */
|
||||
|
||||
/*
|
||||
* Calcurse - text-based organizer
|
||||
@ -191,19 +191,22 @@ goto_day(int colr, int day, int month, int year,
|
||||
int wrong_day = 0;
|
||||
char *mesg_line1 = _("The day you entered is not valid");
|
||||
char *mesg_line2 = _("Press [ENTER] to continue");
|
||||
char *request_date = _("Enter the day to go to [ENTER for today] : dd/mm/yyyy");
|
||||
char *request_date = _("Enter the day to go to [ENTER for today] : mm/dd/yyyy");
|
||||
|
||||
while (wrong_day != 1) {
|
||||
status_mesg(request_date, "");
|
||||
if (getstring(swin, colr, selected_day, LDAY, 0, 1) == 0) {
|
||||
if (getstring(swin, colr, selected_day, LDAY, 0, 1) == 1)
|
||||
return;
|
||||
else {
|
||||
if (strlen(selected_day) == 0) {
|
||||
// go to today
|
||||
*sel_day = day;
|
||||
*sel_month = month;
|
||||
*sel_year = year;
|
||||
break;
|
||||
} else {
|
||||
sscanf(selected_day, "%u/%u/%u", &dday, &dmonth,
|
||||
&dyear);
|
||||
sscanf(selected_day, "%u/%u/%u",
|
||||
&dmonth, &dday, &dyear);
|
||||
//check if the entered day is correct
|
||||
if ((dday <= 0) | (dday >= 32))
|
||||
wrong_day = 1;
|
||||
@ -223,5 +226,6 @@ goto_day(int colr, int day, int month, int year,
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user