ScheduleHelperGetFiscalYear Method |
Gets the fiscal year from the provided date.
Namespace:
Xcalibur.Helpers
Assembly:
Xcalibur.Helpers (in Xcalibur.Helpers.dll) Version: 1.0.1.0 (1.0.1.0)
Syntax public static int GetFiscalYear(
this DateTime date
)
<ExtensionAttribute>
Public Shared Function GetFiscalYear (
date As DateTime
) As Integer
public:
[ExtensionAttribute]
static int GetFiscalYear(
DateTime date
)
[<ExtensionAttribute>]
static member GetFiscalYear :
date : DateTime -> int
Parameters
- date
- Type: SystemDateTime
The date.
Return Value
Type:
Int32Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
DateTime. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Examples 1static void Main(string[] args)
2{
3
4 var currentYear = new DateTime(2017, 1, 1);
5 Console.WriteLine(currentYear.GetFiscalYear());
6
7
8 var nextYear = new DateTime(2017, 10, 1);
9 Console.WriteLine(nextYear.GetFiscalYear());
10
11
12 Console.Read();
13}
14
15
See Also