~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to grub-core/normal/datetime.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-09-13 18:02:04 UTC
  • mfrom: (1.17.15 upstream)
  • mto: (17.6.27 experimental)
  • mto: This revision was merged to the branch mainline in revision 145.
  • Revision ID: package-import@ubuntu.com-20120913180204-mojnmocbimlom4im
Tags: upstream-2.00
ImportĀ upstreamĀ versionĀ 2.00

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include <grub/datetime.h>
 
21
#include <grub/i18n.h>
21
22
 
22
 
static char *grub_weekday_names[] =
 
23
static const char *const grub_weekday_names[] =
23
24
{
24
 
  "Sunday",
25
 
  "Monday",
26
 
  "Tuesday",
27
 
  "Wednesday",
28
 
  "Thursday",
29
 
  "Friday",
30
 
  "Saturday",
 
25
  N_("Sunday"),
 
26
  N_("Monday"),
 
27
  N_("Tuesday"),
 
28
  N_("Wednesday"),
 
29
  N_("Thursday"),
 
30
  N_("Friday"),
 
31
  N_("Saturday"),
31
32
};
32
33
 
33
34
int
42
43
  return (datetime->day + y + y / 4 - y / 100 + y / 400 + (31 * m / 12)) % 7;
43
44
}
44
45
 
45
 
char *
 
46
const char *
46
47
grub_get_weekday_name (struct grub_datetime *datetime)
47
48
{
48
 
  return grub_weekday_names[grub_get_weekday (datetime)];
 
49
  return _ (grub_weekday_names[grub_get_weekday (datetime)]);
49
50
}
50
51
 
51
52
#define SECPERMIN 60