FreeTrainの進化系を目指す
Correct spell miss.
| @@ -1,71 +0,0 @@ | ||
| 1 | -<?xml version="1.0" encoding="utf-8" ?> | |
| 2 | -<calender> | |
| 3 | - <named_conditons> | |
| 4 | - <predefined_group name="DayNames" type="weekly" culture="en-US"/> | |
| 5 | - <predefined_group name="AbbreviatedDayNames" type="weekly" culture="en-US"/> | |
| 6 | - <predefined_group name="MonthNames" type="yearly" culture="en-US"/> | |
| 7 | - <predefined_group name="AbbreviatedMonthNames" type="yearly" culture="en-US"/> | |
| 8 | - <predefined_group name="DayNames" type="weekly"/> | |
| 9 | - <predefined_group name="AbbreviatedDayNames" type="weekly"/> | |
| 10 | - <!--formatに使える文字列--> | |
| 11 | - <!--E 曜日をあらわす数値。(NeoFT固有。ほかはDateTimeの書式指定子準拠)--> | |
| 12 | - <!--d その月の日付。1 桁の日付で、先行ゼロが付きません--> | |
| 13 | - <!--dd その月の日付。1 桁の日には、先行ゼロが付きます--> | |
| 14 | - <!--M 月を表す数値。1 桁の月で、先行ゼロが付きません--> | |
| 15 | - <!--MM 月を表す数値。1 桁の月には、先行ゼロが付きます--> | |
| 16 | - <!--H 24時間形式の時間 1桁の時刻で、先行ゼロが付きません--> | |
| 17 | - <!--HH 24時間形式の時間 1桁の時刻で、先行ゼロが付きます--> | |
| 18 | - <!--m 分 1桁の分で、先行ゼロが付きません--> | |
| 19 | - <!--mm 分 1桁の分で、先行ゼロが付きます--> | |
| 20 | - <group name="Season" type="yearly" format="M"> | |
| 21 | - <assign name="april" from="3" to="5"/> | |
| 22 | - <assign name="summer" from="6" to="8"/> | |
| 23 | - <assign name="fall" from="9" to="11"/> | |
| 24 | - <assign name="winter" from="12" to="2"/> | |
| 25 | - </group> | |
| 26 | - <group name="DayNight" type="daily" format="H"> | |
| 27 | - <assign name="day" from="6" to="18"/> | |
| 28 | - <assign name="night" from="19" to="5"/> | |
| 29 | - </group> | |
| 30 | - <group name="TimeOfDay" type="daily" format="H"> | |
| 31 | - <assign name="before-dawn" from="3" to="5"/> | |
| 32 | - <assign name="sunrise" match="5"/> | |
| 33 | - <assign name="daybreak" from="4" to="5"/> | |
| 34 | - <assign name="dawn" from="5" to="7"/> | |
| 35 | - <assign name="morning" from="7" to="11"/> | |
| 36 | - <assign name="early-morning" from="5" to="7"/> | |
| 37 | - <assign name="late-morning" from="8" to="11"/> | |
| 38 | - <assign name="noon" from="11" to="13"/> | |
| 39 | - <assign name="lunchtime" from="11" to="13"/> | |
| 40 | - <assign name="highnoon" match="12"/> | |
| 41 | - <assign name="afternoon" from="12" to="17"/> | |
| 42 | - <assign name="early-afternoon" from="12" to="14"/> | |
| 43 | - <assign name="late-afternoon" from="15" to="17"/> | |
| 44 | - <assign name="sunset" match="18"/> | |
| 45 | - <assign name="dusk" from="17" to="18"/> | |
| 46 | - <assign name="evening" from="18" to="23"/> | |
| 47 | - <assign name="dinner-time" from="18" to="20"/> | |
| 48 | - <assign name="early-evening" from="18" to="20"/> | |
| 49 | - <assign name="late-evening" from="21" to="23"/> | |
| 50 | - <assign name="midnight" match="24"/> | |
| 51 | - <assign name="around-midnight" from="23" to="2"/> | |
| 52 | - <assign name="after-midnight" from="0" to="3"/> | |
| 53 | - <assign name="dead-of-night" from="2" to="3"/> | |
| 54 | - <assign name="bedtime" from="23" to="6"/> | |
| 55 | - </group> | |
| 56 | - <group name="DayOfWeek" type="weekly" format="E"> | |
| 57 | - <!--DateTimeのAbbreviatedDayNames /DayNames はデフォルトで有効 --> | |
| 58 | - <assign name="日曜" match="0"/> | |
| 59 | - <assign name="月曜" match="1"/> | |
| 60 | - <assign name="火曜" match="2"/> | |
| 61 | - <assign name="水曜" match="3"/> | |
| 62 | - <assign name="木曜" match="4"/> | |
| 63 | - <assign name="金曜" match="5"/> | |
| 64 | - <assign name="土曜" match="6"/> | |
| 65 | - </group> | |
| 66 | - <group name="WorkDays" type="weekly" format="E"> | |
| 67 | - <assign name="weekdays" from="1" to="5"/> | |
| 68 | - <assign name="weekends" from="6" to="0"/> | |
| 69 | - </group> | |
| 70 | - </named_conditons> | |
| 71 | -</calender> | |
| \ No newline at end of file |
| @@ -15,10 +15,10 @@ | ||
| 15 | 15 | <description>Form Manager based on System.Windows.Forms</description> |
| 16 | 16 | </module> |
| 17 | 17 | <module name="Game Time Calendar"> |
| 18 | - <class name="nft.core.schedule.Calender" codebase=".Core"/> | |
| 18 | + <class name="nft.core.schedule.Calendar" codebase=".Core"/> | |
| 19 | 19 | <description>Calendar For Game World</description> |
| 20 | 20 | <settings> |
| 21 | - <include>module_calender.xml</include> | |
| 21 | + <include>module_calendar.xml</include> | |
| 22 | 22 | </settings> |
| 23 | 23 | <preference> |
| 24 | 24 | <param name="UseRealDaysInMonth" type="Boolean"> |
| @@ -1,121 +0,0 @@ | ||
| 1 | -using System; | |
| 2 | -using System.Diagnostics; | |
| 3 | -using nft.framework; | |
| 4 | -using nft.util; | |
| 5 | -using nft.framework.plugin; | |
| 6 | -using System.Reflection; | |
| 7 | -using System.Globalization; | |
| 8 | -using nft.core.view; | |
| 9 | - | |
| 10 | -namespace nft.core.schedule | |
| 11 | -{ | |
| 12 | - /// <summary> | |
| 13 | - /// Time instant. | |
| 14 | - /// </summary> | |
| 15 | - [Serializable] | |
| 16 | - public class Calendar | |
| 17 | - { | |
| 18 | - private static Calendar the_calender; | |
| 19 | - public static Calendar ActiveCalender { | |
| 20 | - get { | |
| 21 | - return the_calender; | |
| 22 | - } | |
| 23 | - set { | |
| 24 | - the_calender = value; | |
| 25 | - } | |
| 26 | - } | |
| 27 | - | |
| 28 | - public enum Cycles { | |
| 29 | - Unknown, Hourly, Daily, Weekly, Monthly, Yearly | |
| 30 | - } | |
| 31 | - | |
| 32 | - private TimeLength[] condToLength; | |
| 33 | - | |
| 34 | - public Calendar(ParamsReader node) | |
| 35 | - { | |
| 36 | - ParamsReader f = PluginUtil.LoadAnotherXml(node["settings"]["include"]); | |
| 37 | - LoadSettingFile(f); | |
| 38 | - ActiveCalender = this; | |
| 39 | - } | |
| 40 | - | |
| 41 | - public long GetCycleTotalTicks(Cycles cycle) { | |
| 42 | - TimeLength tl = condToLength[(int)cycle]; | |
| 43 | - return tl.TotalSeconds; | |
| 44 | - } | |
| 45 | - /// <summary> | |
| 46 | - /// Retruns reminder ticks (in seconds) divided by given cycle. | |
| 47 | - /// </summary> | |
| 48 | - /// <param name="t"></param> | |
| 49 | - /// <param name="cycle"></param> | |
| 50 | - /// <returns></returns> | |
| 51 | - public long GetCyclicTicks(Time t, Cycles cycle) { | |
| 52 | - TimeLength tl = condToLength[(int)cycle]; | |
| 53 | - return t.Ticks % tl.TotalSeconds; | |
| 54 | - } | |
| 55 | - | |
| 56 | - public void LoadSettingFile(ParamsReader reader){ | |
| 57 | - Debug.WriteLine("Load calender settings from:"+reader.SourceURI); | |
| 58 | - ParamsReader cr = reader["calender"]; | |
| 59 | - ReadNamedConditions(cr["named_conditons"]); | |
| 60 | - } | |
| 61 | - | |
| 62 | - private void InitCondToLength(ParamsReader reader) { | |
| 63 | - if (condToLength == null) { | |
| 64 | - condToLength = new TimeLength[Enum.GetValues(typeof(Cycles)).Length]; | |
| 65 | - } | |
| 66 | - condToLength.Initialize(); | |
| 67 | - condToLength[(int)Cycles.Unknown] = new TimeLength(long.MaxValue); | |
| 68 | - condToLength[(int)Cycles.Daily] = TimeLength.FromHours(24); | |
| 69 | - condToLength[(int)Cycles.Weekly] = TimeLength.FromDays(7); | |
| 70 | - condToLength[(int)Cycles.Monthly] = TimeLength.FromHours(24); | |
| 71 | - condToLength[(int)Cycles.Yearly] = TimeLength.FromDays(365); | |
| 72 | - } | |
| 73 | - | |
| 74 | - | |
| 75 | - private void ReadNamedConditions(ParamsReader r){ | |
| 76 | - foreach (ParamsReader r1 in r.EnumChildren("predefined_group")) { | |
| 77 | - ReadPredefinedGroup(r1); | |
| 78 | - } | |
| 79 | - foreach (ParamsReader r2 in r.EnumChildren("group")) { | |
| 80 | - ReadGroup(r2); | |
| 81 | - } | |
| 82 | - } | |
| 83 | - | |
| 84 | - private void ReadGroup(ParamsReader r) { | |
| 85 | - } | |
| 86 | - | |
| 87 | - private void ReadPredefinedGroup(ParamsReader r) { | |
| 88 | - string name = r["name"].InnerText; | |
| 89 | - string tpnam = r["type"].InnerText; | |
| 90 | - string culnam = r["culture"].InnerText; | |
| 91 | - CultureInfo culture = culnam!=null ? CultureInfo.GetCultureInfo(culnam):CultureInfo.CurrentCulture; | |
| 92 | - Type t = typeof(DateTimeFormatInfo); | |
| 93 | - string[] arr = t.InvokeMember(name, BindingFlags.Default, null, culture.DateTimeFormat, null) as string[]; | |
| 94 | - if (arr.Length == 7) { | |
| 95 | - PrepareDayOfWeekGroup(arr); | |
| 96 | - } else if (arr.Length == 12) { | |
| 97 | - PrepareMonthGroup(arr); | |
| 98 | - } else { | |
| 99 | - Debug.WriteLine("Unknown array: "+name); | |
| 100 | - } | |
| 101 | - } | |
| 102 | - | |
| 103 | - private void PrepareDayOfWeekGroup(string[] arr) { | |
| 104 | - for(int i=0; i<arr.Length; i++){ | |
| 105 | - PrimitiveConditions.CreateSceneCondition(arr[i], ConditionTypes.Weekly, i, Cycles.Daily); | |
| 106 | - } | |
| 107 | - } | |
| 108 | - | |
| 109 | - private void PrepareMonthGroup(string[] arr) { | |
| 110 | - for (int i = 0; i < arr.Length; i++) { | |
| 111 | - PrimitiveConditions.CreateSceneCondition(arr[i], ConditionTypes.Yearly, i, Cycles.Monthly); | |
| 112 | - } | |
| 113 | - } | |
| 114 | - | |
| 115 | - public static ISceneCondition CreateCondition(string name, ConditionTypes ctype, IComparable from, IComparable to) { | |
| 116 | - | |
| 117 | - return null; | |
| 118 | - } | |
| 119 | - | |
| 120 | - } | |
| 121 | -} |
| @@ -3,6 +3,7 @@ | ||
| 3 | 3 | using System.Text; |
| 4 | 4 | using nft.core.view; |
| 5 | 5 | using TimeCycle = nft.core.schedule.Calendar.Cycles; |
| 6 | +using System.Diagnostics; | |
| 6 | 7 | |
| 7 | 8 | namespace nft.core.schedule { |
| 8 | 9 | public class PrimitiveConditions { |
| @@ -9,6 +10,7 @@ | ||
| 9 | 10 | protected static Dictionary<string, ISceneCondition> conditions = new Dictionary<string, ISceneCondition>(); |
| 10 | 11 | |
| 11 | 12 | public static void RegisterCondtion(ISceneCondition cond) { |
| 13 | + Debug.WriteLine("Register condition: name="+cond.ConditionName); | |
| 12 | 14 | conditions.Add(cond.ConditionName, cond); |
| 13 | 15 | } |
| 14 | 16 |
| @@ -37,7 +37,7 @@ | ||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | public override IComparable GetTestValue(ISceneParams p) { |
| 40 | - long l1 = Calendar.ActiveCalender.GetCyclicTicks(p.Time, (TimeCycle)condtype); | |
| 40 | + long l1 = Calendar.ActiveCalendar.GetCyclicTicks(p.Time, (TimeCycle)condtype); | |
| 41 | 41 | return l1; |
| 42 | 42 | } |
| 43 | 43 | } |
| @@ -48,7 +48,7 @@ | ||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | public override IComparable GetTestValue(ISceneParams p) { |
| 51 | - decimal l1 = Calendar.ActiveCalender.GetCyclicTicks(p.Time, (TimeCycle)condtype); | |
| 51 | + decimal l1 = Calendar.ActiveCalendar.GetCyclicTicks(p.Time, (TimeCycle)condtype); | |
| 52 | 52 | return (long)Math.Floor(l1 / Time.HOUR); |
| 53 | 53 | } |
| 54 | 54 | } |
| @@ -59,7 +59,7 @@ | ||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | public override IComparable GetTestValue(ISceneParams p) { |
| 62 | - decimal l1 = Calendar.ActiveCalender.GetCyclicTicks(p.Time, (TimeCycle)condtype); | |
| 62 | + decimal l1 = Calendar.ActiveCalendar.GetCyclicTicks(p.Time, (TimeCycle)condtype); | |
| 63 | 63 | return (long)Math.Floor(l1 / Time.DAY); |
| 64 | 64 | } |
| 65 | 65 | } |
| @@ -70,7 +70,7 @@ | ||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | public override IComparable GetTestValue(ISceneParams p) { |
| 73 | - decimal l1 = Calendar.ActiveCalender.GetCyclicTicks(p.Time, (TimeCycle)condtype); | |
| 73 | + decimal l1 = Calendar.ActiveCalendar.GetCyclicTicks(p.Time, (TimeCycle)condtype); | |
| 74 | 74 | return (long)Math.Floor(l1 / Time.DAY); |
| 75 | 75 | } |
| 76 | 76 | } |
| @@ -0,0 +1,121 @@ | ||
| 1 | +using System; | |
| 2 | +using System.Diagnostics; | |
| 3 | +using nft.framework; | |
| 4 | +using nft.util; | |
| 5 | +using nft.framework.plugin; | |
| 6 | +using System.Reflection; | |
| 7 | +using System.Globalization; | |
| 8 | +using nft.core.view; | |
| 9 | + | |
| 10 | +namespace nft.core.schedule | |
| 11 | +{ | |
| 12 | + /// <summary> | |
| 13 | + /// Time instant. | |
| 14 | + /// </summary> | |
| 15 | + [Serializable] | |
| 16 | + public class Calendar | |
| 17 | + { | |
| 18 | + private static Calendar the_calendar; | |
| 19 | + public static Calendar ActiveCalendar { | |
| 20 | + get { | |
| 21 | + return the_calendar; | |
| 22 | + } | |
| 23 | + set { | |
| 24 | + the_calendar = value; | |
| 25 | + } | |
| 26 | + } | |
| 27 | + | |
| 28 | + public enum Cycles { | |
| 29 | + Unknown, Hourly, Daily, Weekly, Monthly, Yearly | |
| 30 | + } | |
| 31 | + | |
| 32 | + private TimeLength[] condToLength; | |
| 33 | + | |
| 34 | + public Calendar(ParamsReader node) | |
| 35 | + { | |
| 36 | + ParamsReader f = PluginUtil.LoadAnotherXml(node["settings"]["include"]); | |
| 37 | + LoadSettingFile(f); | |
| 38 | + ActiveCalendar = this; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public long GetCycleTotalTicks(Cycles cycle) { | |
| 42 | + TimeLength tl = condToLength[(int)cycle]; | |
| 43 | + return tl.TotalSeconds; | |
| 44 | + } | |
| 45 | + /// <summary> | |
| 46 | + /// Retruns reminder ticks (in seconds) divided by given cycle. | |
| 47 | + /// </summary> | |
| 48 | + /// <param name="t"></param> | |
| 49 | + /// <param name="cycle"></param> | |
| 50 | + /// <returns></returns> | |
| 51 | + public long GetCyclicTicks(Time t, Cycles cycle) { | |
| 52 | + TimeLength tl = condToLength[(int)cycle]; | |
| 53 | + return t.Ticks % tl.TotalSeconds; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public void LoadSettingFile(ParamsReader reader){ | |
| 57 | + Debug.WriteLine("Load calender settings from:"+reader.SourceURI); | |
| 58 | + ParamsReader cr = reader["calender"]; | |
| 59 | + ReadNamedConditions(cr["named_conditons"]); | |
| 60 | + } | |
| 61 | + | |
| 62 | + private void InitCondToLength(ParamsReader reader) { | |
| 63 | + if (condToLength == null) { | |
| 64 | + condToLength = new TimeLength[Enum.GetValues(typeof(Cycles)).Length]; | |
| 65 | + } | |
| 66 | + condToLength.Initialize(); | |
| 67 | + condToLength[(int)Cycles.Unknown] = new TimeLength(long.MaxValue); | |
| 68 | + condToLength[(int)Cycles.Daily] = TimeLength.FromHours(24); | |
| 69 | + condToLength[(int)Cycles.Weekly] = TimeLength.FromDays(7); | |
| 70 | + condToLength[(int)Cycles.Monthly] = TimeLength.FromHours(24); | |
| 71 | + condToLength[(int)Cycles.Yearly] = TimeLength.FromDays(365); | |
| 72 | + } | |
| 73 | + | |
| 74 | + | |
| 75 | + private void ReadNamedConditions(ParamsReader r){ | |
| 76 | + foreach (ParamsReader r1 in r.EnumChildren("predefined_group")) { | |
| 77 | + ReadPredefinedGroup(r1); | |
| 78 | + } | |
| 79 | + foreach (ParamsReader r2 in r.EnumChildren("group")) { | |
| 80 | + ReadGroup(r2); | |
| 81 | + } | |
| 82 | + } | |
| 83 | + | |
| 84 | + private void ReadGroup(ParamsReader r) { | |
| 85 | + } | |
| 86 | + | |
| 87 | + private void ReadPredefinedGroup(ParamsReader r) { | |
| 88 | + string name = r["name"].InnerText; | |
| 89 | + string tpnam = r["type"].InnerText; | |
| 90 | + string culnam = r["culture"].InnerText; | |
| 91 | + CultureInfo culture = culnam!=null ? CultureInfo.GetCultureInfo(culnam):CultureInfo.CurrentCulture; | |
| 92 | + Type t = typeof(DateTimeFormatInfo); | |
| 93 | + string[] arr = t.InvokeMember(name, BindingFlags.Default, null, culture.DateTimeFormat, null) as string[]; | |
| 94 | + if (arr.Length == 7) { | |
| 95 | + PrepareDayOfWeekGroup(arr); | |
| 96 | + } else if (arr.Length == 12) { | |
| 97 | + PrepareMonthGroup(arr); | |
| 98 | + } else { | |
| 99 | + Debug.WriteLine("Unknown array: "+name); | |
| 100 | + } | |
| 101 | + } | |
| 102 | + | |
| 103 | + private void PrepareDayOfWeekGroup(string[] arr) { | |
| 104 | + for(int i=0; i<arr.Length; i++){ | |
| 105 | + PrimitiveConditions.CreateSceneCondition(arr[i], ConditionTypes.Weekly, i, Cycles.Daily); | |
| 106 | + } | |
| 107 | + } | |
| 108 | + | |
| 109 | + private void PrepareMonthGroup(string[] arr) { | |
| 110 | + for (int i = 0; i < arr.Length; i++) { | |
| 111 | + PrimitiveConditions.CreateSceneCondition(arr[i], ConditionTypes.Yearly, i, Cycles.Monthly); | |
| 112 | + } | |
| 113 | + } | |
| 114 | + | |
| 115 | + public static ISceneCondition CreateCondition(string name, ConditionTypes ctype, IComparable from, IComparable to) { | |
| 116 | + | |
| 117 | + return null; | |
| 118 | + } | |
| 119 | + | |
| 120 | + } | |
| 121 | +} |
| @@ -0,0 +1,71 @@ | ||
| 1 | +<?xml version="1.0" encoding="utf-8" ?> | |
| 2 | +<calendar> | |
| 3 | + <named_conditons> | |
| 4 | + <predefined_group name="DayNames" type="weekly" culture="en-US"/> | |
| 5 | + <predefined_group name="AbbreviatedDayNames" type="weekly" culture="en-US"/> | |
| 6 | + <predefined_group name="MonthNames" type="yearly" culture="en-US"/> | |
| 7 | + <predefined_group name="AbbreviatedMonthNames" type="yearly" culture="en-US"/> | |
| 8 | + <predefined_group name="DayNames" type="weekly"/> | |
| 9 | + <predefined_group name="AbbreviatedDayNames" type="weekly"/> | |
| 10 | + <!--formatに使える文字列--> | |
| 11 | + <!--E 曜日をあらわす数値。(NeoFT固有。ほかはDateTimeの書式指定子準拠)--> | |
| 12 | + <!--d その月の日付。1 桁の日付で、先行ゼロが付きません--> | |
| 13 | + <!--dd その月の日付。1 桁の日には、先行ゼロが付きます--> | |
| 14 | + <!--M 月を表す数値。1 桁の月で、先行ゼロが付きません--> | |
| 15 | + <!--MM 月を表す数値。1 桁の月には、先行ゼロが付きます--> | |
| 16 | + <!--H 24時間形式の時間 1桁の時刻で、先行ゼロが付きません--> | |
| 17 | + <!--HH 24時間形式の時間 1桁の時刻で、先行ゼロが付きます--> | |
| 18 | + <!--m 分 1桁の分で、先行ゼロが付きません--> | |
| 19 | + <!--mm 分 1桁の分で、先行ゼロが付きます--> | |
| 20 | + <group name="Season" type="yearly" format="M"> | |
| 21 | + <assign name="april" from="3" to="5"/> | |
| 22 | + <assign name="summer" from="6" to="8"/> | |
| 23 | + <assign name="fall" from="9" to="11"/> | |
| 24 | + <assign name="winter" from="12" to="2"/> | |
| 25 | + </group> | |
| 26 | + <group name="DayNight" type="daily" format="H"> | |
| 27 | + <assign name="day" from="6" to="18"/> | |
| 28 | + <assign name="night" from="19" to="5"/> | |
| 29 | + </group> | |
| 30 | + <group name="TimeOfDay" type="daily" format="H"> | |
| 31 | + <assign name="before-dawn" from="3" to="5"/> | |
| 32 | + <assign name="sunrise" match="5"/> | |
| 33 | + <assign name="daybreak" from="4" to="5"/> | |
| 34 | + <assign name="dawn" from="5" to="7"/> | |
| 35 | + <assign name="morning" from="7" to="11"/> | |
| 36 | + <assign name="early-morning" from="5" to="7"/> | |
| 37 | + <assign name="late-morning" from="8" to="11"/> | |
| 38 | + <assign name="noon" from="11" to="13"/> | |
| 39 | + <assign name="lunchtime" from="11" to="13"/> | |
| 40 | + <assign name="highnoon" match="12"/> | |
| 41 | + <assign name="afternoon" from="12" to="17"/> | |
| 42 | + <assign name="early-afternoon" from="12" to="14"/> | |
| 43 | + <assign name="late-afternoon" from="15" to="17"/> | |
| 44 | + <assign name="sunset" match="18"/> | |
| 45 | + <assign name="dusk" from="17" to="18"/> | |
| 46 | + <assign name="evening" from="18" to="23"/> | |
| 47 | + <assign name="dinner-time" from="18" to="20"/> | |
| 48 | + <assign name="early-evening" from="18" to="20"/> | |
| 49 | + <assign name="late-evening" from="21" to="23"/> | |
| 50 | + <assign name="midnight" match="24"/> | |
| 51 | + <assign name="around-midnight" from="23" to="2"/> | |
| 52 | + <assign name="after-midnight" from="0" to="3"/> | |
| 53 | + <assign name="dead-of-night" from="2" to="3"/> | |
| 54 | + <assign name="bedtime" from="23" to="6"/> | |
| 55 | + </group> | |
| 56 | + <group name="DayOfWeek" type="weekly" format="E"> | |
| 57 | + <!--DateTimeのAbbreviatedDayNames /DayNames はデフォルトで有効 --> | |
| 58 | + <assign name="日曜" match="0"/> | |
| 59 | + <assign name="月曜" match="1"/> | |
| 60 | + <assign name="火曜" match="2"/> | |
| 61 | + <assign name="水曜" match="3"/> | |
| 62 | + <assign name="木曜" match="4"/> | |
| 63 | + <assign name="金曜" match="5"/> | |
| 64 | + <assign name="土曜" match="6"/> | |
| 65 | + </group> | |
| 66 | + <group name="WorkDays" type="weekly" format="E"> | |
| 67 | + <assign name="weekdays" from="1" to="5"/> | |
| 68 | + <assign name="weekends" from="6" to="0"/> | |
| 69 | + </group> | |
| 70 | + </named_conditons> | |
| 71 | +</calendar> | |
| \ No newline at end of file |