-
Notifications
You must be signed in to change notification settings - Fork 0
/
Day.cs
42 lines (39 loc) · 1.04 KB
/
Day.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
namespace PhpToXml
{
public static class Day
{
public const int Monday = 0;
public const int Tuesday = 1;
public const int Wednesday = 2;
public const int Thursday = 3;
public const int Friday = 4;
public const int Other = 5;
public const int DAY_MAX = 6;
public static int ToDay(string s)
{
int day;
switch (s)
{
case "月曜":
day = Day.Monday;
break;
case "火曜":
day = Day.Tuesday;
break;
case "水曜":
day = Day.Wednesday;
break;
case "木曜":
day = Day.Thursday;
break;
case "金曜":
day = Day.Friday;
break;
default:
day = Day.Other;
break;
}
return day;
}
}
}