Class PeriodOfWeekIterator
This class allows you to keep track of the current time in terms of "periods of the week" in a specific timezone.
Inheritance
System.Object
PeriodOfWeekIterator
Namespace: FFT.TimeStamps
Assembly: FFT.TimeStamps.dll
Syntax
public sealed class PeriodOfWeekIterator : object
Constructors
| Improve this Doc View SourcePeriodOfWeekIterator(TimeZoneInfo, TimeSpan, TimeSpan, TimeStamp)
Initializes a new instance of the PeriodOfWeekIterator class.
Declaration
public PeriodOfWeekIterator(TimeZoneInfo timeZone, TimeSpan periodLength, TimeSpan periodOffset, TimeStamp at)
Parameters
Type | Name | Description |
---|---|---|
TimeZoneInfo | timeZone | |
TimeSpan | periodLength | |
TimeSpan | periodOffset | |
TimeStamp | at |
Properties
| Improve this Doc View SourceAt
Gets the time that the iterator has been advanced to.
Declaration
public TimeStamp At { get; }
Property Value
Type | Description |
---|---|
TimeStamp |
Current
Gets a value representing the period of week in progress at the current time.
Declaration
public PeriodOfTime Current { get; }
Property Value
Type | Description |
---|---|
PeriodOfTime |
Next
Gets a value representing the next period of week.
Declaration
public PeriodOfTime Next { get; }
Property Value
Type | Description |
---|---|
PeriodOfTime |
PeriodLength
Gets the length of the periods that the week is divided into.
Declaration
public TimeSpan PeriodLength { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
PeriodOffset
Gets the offset that is used when the first period of week is not supposed to start at midday, Sunday.
Declaration
public TimeSpan PeriodOffset { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
Previous
Gets a value representing the next period of week.
Declaration
public PeriodOfTime Previous { get; }
Property Value
Type | Description |
---|---|
PeriodOfTime |
TimeZone
Gets the timezone that the periods of week are defined for.
Declaration
public TimeZoneInfo TimeZone { get; }
Property Value
Type | Description |
---|---|
TimeZoneInfo |
Methods
| Improve this Doc View SourceMoveTo(TimeStamp)
Advances the iterator to the given at
.
Declaration
public bool MoveTo(TimeStamp at)
Parameters
Type | Name | Description |
---|---|---|
TimeStamp | at |
Returns
Type | Description |
---|---|
System.Boolean | True if the move resulted in a new period of week, False otherwise. |