-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTimeSpanUnit.cs
41 lines (39 loc) · 1.41 KB
/
TimeSpanUnit.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
using System.Globalization;
namespace CK.Core;
/// <summary>
/// Defines the units of time span.
/// </summary>
/// <remarks>
/// Weeks are not easy (see https://en.wikipedia.org/wiki/ISO_week_date) and cannot really be
/// grouped by semester or quarter. If this need to be supported, the ISO definition implemented
/// by <see cref="ISOWeek"/> should be used (week starts on monday).
/// <para>
/// One should also decide how the Day of Week should be rendered: this may be the number (1 to 7),
/// the <see cref="CultureInfo.InvariantCulture"/>'s <see cref="CultureInfo.DateTimeFormat"/>'s
/// <see cref="DateTimeFormatInfo.DayNames"/> ("Monday" to "Sunday"), <see cref="DateTimeFormatInfo.AbbreviatedDayNames"/>
/// ("Mon" to "Sun") or <see cref="DateTimeFormatInfo.ShortestDayNames"/> ("Mo" to "Su").
/// These names array start with sunday (the en-US way) instead of the ISO monday. This will have to be handled
/// to conform to the ISO rules.
/// </para>
/// <para>
/// Supporting weeks may be for the future.
/// </para>
/// </remarks>
public enum TimeSpanUnit : byte
{
/// <summary>
/// Non applicable.
/// </summary>
None = 0,
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
Year,
Semester,
Quarter,
Month,
Day,
Hour,
Minute,
Second,
Millisecond
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
}