|
|
DateTime Viper Module
Viper Methods
| Global Viper Method | Description |
|---|---|
| DateTime.AddDays Viper Method | Adds the specified number of days to the value of the given DateTime. |
| DateTime.AddHours Viper Method | Adds the specified number of hours to the value of the given DateTime. |
| DateTime.AddMilliseconds Viper Method | Adds the specified number of milliseconds to the value of the given DateTime. |
| DateTime.AddMinutes Viper Method | Adds the specified number of minutes to the value of the given DateTime. |
| DateTime.AddMonths Viper Method | Adds the specified number of months to the value of the given DateTime. |
| DateTime.AddSeconds Viper Method | Adds the specified number of seconds to the value of the given DateTime. |
| DateTime.AddYears Viper Method | Adds the specified number of years to the value of the given DateTime. |
| DateTime.CalculateAge Viper Method | Calculates the age, based on birth date. |
| DateTime.DaysBetween Viper Method | Returns the number of whole and fractional days between two given DateTime values. |
| DateTime.GetDate Viper Method | Gets the date component of the current date. |
| DateTime.GetDay Viper Method | Gets the day of the month. |
| DateTime.GetDayOfWeek Viper Method | Gets the day of the week. |
| DateTime.GetDayOfYear Viper Method | Gets the day of the year. |
| DateTime.GetDaysInMonth Viper Method | Returns the number of days in the specified month and year. |
| DateTime.GetDaysInYear Viper Method | Returns the number of days in the specified year. |
| DateTime.GetHours Viper Method | Gets the hour component of the current date. |
| DateTime.GetMilliSeconds Viper Method | Gets the milliseconds component of current date/time. |
| DateTime.GetMinutes Viper Method | Gets the minute component of the given DateTime. |
| DateTime.GetMonth Viper Method | Gets the month component of the current date. |
| DateTime.GetSeconds Viper Method | Gets the seconds component of the current date/time. |
| DateTime.GetUtcOffset Viper Method | Returns the Coordinated Universal Time (UTC) offset for the current local time and current time zone, represented in minutes. |
| DateTime.GetYear Viper Method | Gets the year component of the current date. |
| DateTime.HoursBetween Viper Method | Returns the number of whole and fractional hours between two given DateTime values. |
| DateTime.IsDaylightSavingTime Viper Method | Indicates whether the given DateTime value is within the Daylight Saving Time range for the current time zone. |
| DateTime.IsLeapYear Viper Method | Determines whether the specified year is a leap year. |
| DateTime.IsLocalTime Viper Method | Determines whether the time represented by the given DateTime is based on local time. |
| DateTime.IsToday Viper Method | Determines whether the specified date is today. |
| DateTime.IsUniversalTime Viper Method | Determines whether the time represented by the given DateTime is based on universal time. |
| DateTime.IsUnspecifiedTimeZone Viper Method | Determines whether the time represented by the given DateTime is based on an unspecified time zone. |
| DateTime.MaxValue Viper Method | Represents the largest possible value of DateTime. |
| DateTime.MillisecondsBetween Viper Method | Returns the number of whole and fractional milliseconds between two given DateTime values. |
| DateTime.MinutesBetween Viper Method | Returns the number of whole and fractional minutes between two given DateTime values. |
| DateTime.MinValue Viper Method | Represents the smallest possible value of DateTime. |
| DateTime.Now Viper Method | Returns the current date and time in short time string representation. |
| DateTime.SecondsBetween Viper Method | Returns the number of whole and fractional seconds between two given DateTime values. |
| DateTime.SetDate Viper Method | Sets the date components of the given DateTime. |
| DateTime.SetDay Viper Method | Sets the day component of the given DateTime. |
| DateTime.SetHours Viper Method | Sets the hour component of the given DateTime. |
| DateTime.SetMilliSeconds Viper Method | Sets the milliseconds component of the given DateTime. |
| DateTime.SetMinutes Viper Method | Sets the minutes component of the given DateTime. |
| DateTime.SetMonth Viper Method | Sets the month component of the given DateTime. |
| DateTime.SetSeconds Viper Method | Sets the seconds component of the given DateTime. |
| DateTime.SetTime Viper Method | Sets the time components of the given DateTime. |
| DateTime.SetYear Viper Method | Sets the year component of the given DateTime. |
| DateTime.Today Viper Method | Returns the current date. |
| DateTime.ToIsoString Viper Method | Converts the value of the given DateTime to the equivalent string representation specified by the ISO-8601 standard ("yyyy-MM-ddTHH:mm:ss"). |
| DateTime.ToLocalTime Viper Method | Converts the value of the given DateTime object to local time. |
| DateTime.ToRfcString Viper Method | Converts the value of the given DateTime to the equivalent string representation specified by the RFC1123 standard ("ddd, dd MMM yyyy HH:mm:ss GMT"). |
| DateTime.ToUniversalTime Viper Method | Converts the value of the given DateTime object to universal time. |
| DateTime.UtcNow Viper Method | Returns the current date and time expressed as Coordinated Universal Time (UTC) in short time string representation. |
Example
| Smartsite SXML |
|
|---|---|
{buffer.set(date, "1970-10-27T17:43:08+04:00")}
{buffer.set(universalDate, datetime.touniversaltime($date))}
<se:pagetranslations id="datehelper">
<se:collection>
<se:member name="displayinfo(d)">
{buffer.set(d, translation.arg(1))}
Date: {buffer.get(d)}
Is Local Time: {datetime.islocaltime($d)}
Is Universal Time: {datetime.isuniversaltime($d)}
Is Daylight Saving Time: {datetime.isdaylightsavingtime($d)}
Is Leap Year: {datetime.isleapyear(datetime.getyear($d))}
Is Today: {datetime.istoday($d)}
Is Unspecified Timezone: {datetime.isunspecifiedtimezone($d)}
</se:member>
</se:collection>
</se:pagetranslations>
{translation.datehelper.displayinfo($date)}
{translation.datehelper.displayinfo($universalDate)}
|
|
See Also
-
DateTime.AddDays Viper Method
Adds the specified number of days to the value of the given DateTime. -
DateTime.AddHours Viper Method
Adds the specified number of hours to the value of the given DateTime. -
DateTime.AddMilliseconds Viper Method
Adds the specified number of milliseconds to the value of the given DateTime. -
DateTime.AddMinutes Viper Method
Adds the specified number of minutes to the value of the given DateTime. -
DateTime.AddMonths Viper Method
Adds the specified number of months to the value of the given DateTime. -
DateTime.AddSeconds Viper Method
Adds the specified number of seconds to the value of the given DateTime. -
DateTime.AddYears Viper Method
Adds the specified number of years to the value of the given DateTime. -
DateTime.CalculateAge Viper Method
Calculates the age, based on birth date. -
DateTime.DaysBetween Viper Method
Returns the number of whole and fractional days between two given DateTime values. -
DateTime.GetDate Viper Method
Gets the date component of the current date. -
DateTime.GetDay Viper Method
Gets the day of the month. -
DateTime.GetDayOfWeek Viper Method
Gets the day of the week. -
DateTime.GetDayOfYear Viper Method
Gets the day of the year. -
DateTime.GetDaysInMonth Viper Method
Returns the number of days in the specified month and year. -
DateTime.GetDaysInYear Viper Method
Returns the number of days in the specified year. -
DateTime.GetHours Viper Method
Gets the hour component of the current date. -
DateTime.GetMilliSeconds Viper Method
Gets the milliseconds component of current date/time. -
DateTime.GetMinutes Viper Method
Gets the minute component of the given DateTime. -
DateTime.GetMonth Viper Method
Gets the month component of the current date. -
DateTime.GetSeconds Viper Method
Gets the seconds component of the current date/time. -
DateTime.GetUtcOffset Viper Method
Returns the Coordinated Universal Time (UTC) offset for the current local time and current time zone, represented in minutes. -
DateTime.GetYear Viper Method
Gets the year component of the current date. -
DateTime.HoursBetween Viper Method
Returns the number of whole and fractional hours between two given DateTime values. -
DateTime.IsDaylightSavingTime Viper Method
Indicates whether the given DateTime value is within the Daylight Saving Time range for the current time zone. -
DateTime.IsLeapYear Viper Method
Determines whether the specified year is a leap year. -
DateTime.IsLocalTime Viper Method
Determines whether the time represented by the given DateTime is based on local time. -
DateTime.IsToday Viper Method
Determines whether the specified date is today. -
DateTime.IsUniversalTime Viper Method
Determines whether the time represented by the given DateTime is based on universal time. -
DateTime.IsUnspecifiedTimeZone Viper Method
Determines whether the time represented by the given DateTime is based on an unspecified time zone. -
DateTime.MaxValue Viper Method
Represents the largest possible value of DateTime. -
DateTime.MillisecondsBetween Viper Method
Returns the number of whole and fractional milliseconds between two given DateTime values. -
DateTime.MinutesBetween Viper Method
Returns the number of whole and fractional minutes between two given DateTime values. -
DateTime.MinValue Viper Method
Represents the smallest possible value of DateTime. -
DateTime.Now Viper Method
Returns the current date and time in short time string representation. -
DateTime.SecondsBetween Viper Method
Returns the number of whole and fractional seconds between two given DateTime values. -
DateTime.SetDate Viper Method
Sets the date components of the given DateTime. -
DateTime.SetDay Viper Method
Sets the day component of the given DateTime. -
DateTime.SetHours Viper Method
Sets the hour component of the given DateTime. -
DateTime.SetMilliSeconds Viper Method
Sets the milliseconds component of the given DateTime. -
DateTime.SetMinutes Viper Method
Sets the minutes component of the given DateTime. -
DateTime.SetMonth Viper Method
Sets the month component of the given DateTime. -
DateTime.SetSeconds Viper Method
Sets the seconds component of the given DateTime. -
DateTime.SetTime Viper Method
Sets the time components of the given DateTime. -
DateTime.SetYear Viper Method
Sets the year component of the given DateTime. -
DateTime.Today Viper Method
Returns the current date. -
DateTime.ToIsoString Viper Method
Converts the value of the given DateTime to the equivalent string representation specified by the ISO-8601 standard ("yyyy-MM-ddTHH:mm:ss"). -
DateTime.ToLocalTime Viper Method
Converts the value of the given DateTime object to local time. -
DateTime.ToRfcString Viper Method
Converts the value of the given DateTime to the equivalent string representation specified by the RFC1123 standard ("ddd, dd MMM yyyy HH:mm:ss GMT"). -
DateTime.ToUniversalTime Viper Method
Converts the value of the given DateTime object to universal time. -
DateTime.UtcNow Viper Method
Returns the current date and time expressed as Coordinated Universal Time (UTC) in short time string representation.
SXML
- Macro
- Macro Parameters
- Macro Parameter Properties
-
Vipers
-
Global Viper Methods
- AIM Viper Class
- Audit Viper Class
- Buffer Viper Class
- Cache Viper Class
- CacheFile Viper Class
- Calendar Viper Class
- Channel Viper Class
- Char Viper Class
- Cms Viper Class
- ContentType Viper Class
- Convert Viper Class
- Database Viper Class
- DataTable Viper Class
-
- DateTime.AddDays Viper Method
- DateTime.AddHours Viper Method
- DateTime.AddMilliseconds Viper Method
- DateTime.AddMinutes Viper Method
- DateTime.AddMonths Viper Method
- DateTime.AddSeconds Viper Method
- DateTime.AddYears Viper Method
- DateTime.CalculateAge Viper Method
- DateTime.DaysBetween Viper Method
- DateTime.GetDate Viper Method
- DateTime.GetDay Viper Method
- DateTime.GetDayOfWeek Viper Method
- DateTime.GetDayOfYear Viper Method
- DateTime.GetDaysInMonth Viper Method
- DateTime.GetDaysInYear Viper Method
- DateTime.GetHours Viper Method
- DateTime.GetMilliSeconds Viper Method
- DateTime.GetMinutes Viper Method
- DateTime.GetMonth Viper Method
- DateTime.GetSeconds Viper Method
- DateTime.GetUtcOffset Viper Method
- DateTime.GetYear Viper Method
- DateTime.HoursBetween Viper Method
- DateTime.IsDaylightSavingTime Viper Method
- DateTime.IsLeapYear Viper Method
- DateTime.IsLocalTime Viper Method
- DateTime.IsToday Viper Method
- DateTime.IsUniversalTime Viper Method
- DateTime.IsUnspecifiedTimeZone Viper Method
- DateTime.MaxValue Viper Method
- DateTime.MillisecondsBetween Viper Method
- DateTime.MinutesBetween Viper Method
- DateTime.MinValue Viper Method
- DateTime.Now Viper Method
- DateTime.SecondsBetween Viper Method
- DateTime.SetDate Viper Method
- DateTime.SetDay Viper Method
- DateTime.SetHours Viper Method
- DateTime.SetMilliSeconds Viper Method
- DateTime.SetMinutes Viper Method
- DateTime.SetMonth Viper Method
- DateTime.SetSeconds Viper Method
- DateTime.SetTime Viper Method
- DateTime.SetYear Viper Method
- DateTime.Today Viper Method
- DateTime.ToIsoString Viper Method
- DateTime.ToLocalTime Viper Method
- DateTime.ToRfcString Viper Method
- DateTime.ToUniversalTime Viper Method
- DateTime.UtcNow Viper Method
- Debug Viper Class
- DigiD Viper Class
- Env Viper Class
- FileSystem Viper Class
- FlexLayout Viper Class
- Html Viper Class
- Html.Color Viper Class
- Html.Css Viper Class
- Image Viper Class
- ImageProperties Viper Class
- ItemComments Viper Class
- ItemData Viper Class
- License Viper Class
- Locale Viper Class
- Logging Viper Class
- Login Viper Class
- Math Viper Class
- Payment Viper Class
- Personalization Viper Class
- PlaceHolder Viper Class
- Poll Viper Class
- Publication Viper Class
- RenderTemplate Viper Class
- Request Viper Class
- Response Viper Class
- Scf Viper Class
- Security Viper Class
- Session Viper Class
- Site Viper Class
- Smartlet Viper Class
- SmartletEditor Viper Class
- SmartletPreset Viper Class
- Smi Viper Class
- SmiData Viper Class
- Spice Viper Class
- Sql Viper Class
- StandardsCompliance Viper Class
- Storage Viper Class
- String Viper Class
- SXML Viper Class
- Sys Viper Class
- Tags Viper Class
- Translation Viper Class
- Url Viper Class
- User Viper Class
- UserItemFeedback Viper Class
- Xml Viper Class
- Local Viper Methods
-
Global Viper Methods
- SXML Data Types
- Examples
- Tips & Tricks