Date.EndOfWeek
Επιστρέφει το τέλος της εβδομάδας.
Syntax
Date.EndOfWeek(
dateTime as any,
optional firstDayOfWeek as Day.Type
) as any
Remarks
Returns the end of the week that contains dateTime. This function takes an optional Day, firstDayOfWeek, to set as the first day of the week for this relative calculation. The default value is Day.Sunday.
dateTime: Adate,datetime, ordatetimezonevalue from which the last day of the week is calculatedfirstDayOfWeek: (Optional) ADay.Typevalue representing the first day of the week. Possible values areDay.Sunday,Day.Monday,Day.Tuesday,Day.Wednesday,Day.Thursday,Day.FridayandDay.Saturday. The default value isDay.Sunday.
Examples
Example #1
Λάβετε το τέλος της εβδομάδας για τις 14/5/2011.
Date.EndOfWeek(#date(2011, 5, 14))
Result:
#date(2011, 5, 14)
Example #2
Υπολογίστε το τέλος της εβδομάδας για τις 17/5/2011 05:00:00 μ.μ. -7:00, με την Κυριακή (προεπιλογή) να είναι η πρώτη ημέρα της εβδομάδας.
Date.EndOfWeek(#datetimezone(2011, 5, 17, 5, 0, 0, -7, 0), Day.Sunday)
Result:
#datetimezone(2011, 5, 21, 23, 59, 59.9999999, -7, 0)
Category
Date