w전자실 업무일지 양식 수정, 저장 후 색상 업데이트
This commit is contained in:
@@ -150,6 +150,7 @@
|
||||
<Compile Include="fWebCamera.Designer.cs">
|
||||
<DependentUpon>fWebCamera.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ISO8601.cs" />
|
||||
<Compile Include="keyValuedataTable.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Info.cs" />
|
||||
|
||||
37
SubProject/FCOMMON/ISO8601.cs
Normal file
37
SubProject/FCOMMON/ISO8601.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace ISO8601
|
||||
{
|
||||
public static class Calender
|
||||
{
|
||||
private static CultureInfo culture = CultureInfo.CurrentCulture;
|
||||
|
||||
private static int CalcDate(DateTime date)
|
||||
{
|
||||
return date.DayOfWeek != DayOfWeek.Sunday ? DayOfWeek.Thursday - date.DayOfWeek : (int)DayOfWeek.Tuesday - 7;
|
||||
}
|
||||
|
||||
public static int GetYear(DateTime date)
|
||||
{
|
||||
date = date.AddDays(CalcDate(date));
|
||||
return culture.Calendar.GetYear(date);
|
||||
}
|
||||
|
||||
public static int GetMonth(DateTime date)
|
||||
{
|
||||
date = date.AddDays(CalcDate(date));
|
||||
return culture.Calendar.GetMonth(date);
|
||||
}
|
||||
|
||||
public static int GetWorkWeek(DateTime date)
|
||||
{
|
||||
date = date.AddDays(CalcDate(date));
|
||||
return culture.Calendar.GetWeekOfYear(date, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user