Webylon 3.2 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • 1c
    • exchange
      • catalog
  • auth
  • Booking
  • building
    • company
  • cart
    • shipping
    • steppedcheckout
  • Catalog
    • monument
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • AdditionalMenuWidget_Item
  • AdvancedSliderHomepageWidget_Item
  • AssetManagerFolder
  • BannerWidget_Item
  • BaseObjectDecorator
  • BookingOrder
  • BookingPaymentMethod
  • BookingService
  • Boolean
  • ButtonsBlockHomepageWidget_Item
  • CarouselHomepageWidget_Item
  • CatalogFilter
  • CatalogRubricsHomepageWidget_CatalogDecorator
  • ClientEmailOrderNotification
  • ClientVKOrderNotification
  • ComponentSet
  • Currency
  • DatabaseAdmin
  • DataObject
  • DataObjectDecorator
  • DataObjectLog
  • DataObjectSet
  • DataObjectSet_Iterator
  • Date
  • DB
  • DBField
  • Decimal
  • DocumentItem
  • DocumentPage_File
  • Double
  • Enum
  • ErrorPageSubsite
  • FileDataObjectTrackingDecorator
  • FileImportDecorator
  • Float
  • FlowerGarden_Size
  • ForeignKey
  • Hierarchy
  • HouseCatalogProductDecorator
  • HTMLText
  • HTMLVarchar
  • Import1CLog
  • Import1CLog_File
  • Import1CLog_Item
  • Import1CLog_Task
  • ImportCatalog1C_PriceType
  • ImportCatalog1C_ProductProp
  • Int
  • ManagerEmailOrderNotification
  • Material3D_File
  • MediawebPage_File
  • MediawebPage_Photo
  • MobileContentDecorator
  • Money
  • MonumentGalleryItem
  • MonumentPhotoGallery
  • MultiEnum
  • MySQLDatabase
  • MySQLQuery
  • Notification
  • OrderDataObject
  • OrderDecorator
  • OrderHandlersDecorator
  • OrderItemDecorator
  • OrderItemVariationDecorator
  • Orders1CExchange_OrdersDecorator
  • OrderService
  • OrderServiceOrder
  • PageIcon
  • PageWidgets
  • Payment
  • PaymentMethodShippingDecorator
  • PaymentOrderExtension
  • Percentage
  • Person
  • PhotoAlbumItem
  • PhotoAlbumProductLinkDecorator
  • PhotoAlbumWidgetLinkDecorator
  • PhotoGalleryHomepageWidget_Item
  • PortraitType
  • PrimaryKey
  • Product3DDecorator
  • ProductCatalogCatalogLinkedDecorator
  • ProductImportLog
  • ProductImportLog_Item
  • ProductParam
  • ProductParamValue
  • ProductVariation
  • RatePeriod
  • RealtyImportLog
  • RealtyImportLog_Item
  • RedirectEntry
  • RoomOrder
  • RoomOrderPerson
  • RoomRate
  • RoomService
  • RoomServiceOrder
  • SberbankPaymentDecorator
  • SeoOpenGraphPageDecorator
  • ServiceOrder
  • ShippingMethodPaymentDecorator
  • ShopCountry
  • SimpleOrderCatalogDecorator
  • SimpleOrderProductDecorator
  • SiteConfigWidgets
  • SiteTreeDecorator
  • SiteTreeImportDecorator
  • SliderHomepageWidget_Item
  • SMSCOrderNotification
  • SMSOrderNotification
  • SortableDataObject
  • SQLMap
  • SQLMap_Iterator
  • SQLQuery
  • SS_Database
  • SS_Datetime
  • SS_Query
  • StringField
  • SubsiteDomain
  • Text
  • TextAnonsWidget_Item
  • Texture3D_File
  • Time
  • Varchar
  • Versioned
  • Versioned_Version
  • VideoCategory
  • VideoEntry
  • VKNotificationQueue
  • WebylonWidget_Item
  • YaMoneyPaymentDecorator
  • Year

Interfaces

  • CompositeDBField
  • CurrentPageIdentifier
  • DataObjectInterface

Class Date

Represents a date field. The field currently supports New Zealand date format (DD/MM/YYYY), or an ISO 8601 formatted date (YYYY-MM-DD). Alternatively you can set a timestamp that is evaluated through PHP's built-in date() function according to your system locale.

Object
Extended by ViewableData implements IteratorAggregate
Extended by DBField
Extended by Date

Direct known subclasses

SS_Datetime

Package: sapphire\model
Located at sapphire/core/model/fieldtypes/Date.php

Methods summary

public
# setValue( mixed $value )

Set the value on the field. Optionally takes the whole record as an argument, to pick other values.

Set the value on the field. Optionally takes the whole record as an argument, to pick other values.

Parameters

$value
mixed $value

Overrides

DBField::setValue
public
# Nice( )

Returns the date in the format dd/mm/yy TODO i18n formatting for NIce

Returns the date in the format dd/mm/yy TODO i18n formatting for NIce

public
# NiceUS( )
public
# Year( )

Returns the year from the given date

Returns the year from the given date

public
# Day( )

Returns the Full day, of the given date.

Returns the Full day, of the given date.

public
# ShortMonth( )

Returns the month

Returns the month

public
# DayOfMonth( )

Returns the date of the month

Returns the date of the month

public
# Month( )
public
# Long( )

Returns the date in the format 24 December 2006

Returns the date in the format 24 December 2006

public
# Full( )

Returns the date in the format 24 Dec 2006

Returns the date in the format 24 Dec 2006

public string
# Format( string $format )

Return the date using a particular formatting string.

Return the date using a particular formatting string.

Parameters

$format
string $format Format code string. e.g. "d M Y"

Returns

string
The date in the requested format
public
# FormatI18N( mixed $formattingString )

Return the date formatted using the given strftime formatting string.

Return the date formatted using the given strftime formatting string.

strftime obeys the current LC_TIME/LC_ALL when printing lexical values like day- and month-names

public
# RangeString( mixed $otherDateObj )
public
# Rfc822( )
public
# Rfc2822( )
public
# Rfc3339( )
public
# Ago( )

Returns the number of seconds/minutes/hours/days or months since the timestamp

Returns the number of seconds/minutes/hours/days or months since the timestamp

public
# TimeDiff( )
public string
# TimeDiffIn( string $format )

Gets the time difference, but always returns it in a certain format

Gets the time difference, but always returns it in a certain format

Parameters

$format
string $format The format, could be one of these: 'seconds', 'minutes', 'hours', 'days', 'months', 'years'.

Returns

string
string
public
# requireField( )

Add the field to the underlying database.

Add the field to the underlying database.

public boolean
# InPast( )

Returns true if date is in the past.

Returns true if date is in the past.

Returns

boolean
boolean
public boolean
# InFuture( )

Returns true if date is in the future.

Returns true if date is in the future.

Returns

boolean
boolean
public boolean
# IsToday( )

Returns true if date is today.

Returns true if date is today.

Returns

boolean
boolean
public
# URLDate( )

Returns a date suitable for insertion into a URL and use by the system.

Returns a date suitable for insertion into a URL and use by the system.

public
# days_between( mixed $fyear, mixed $fmonth, mixed $fday, mixed $tyear, mixed $tmonth, mixed $tday )
public
# day_before( mixed $fyear, mixed $fmonth, mixed $fday )
public
# next_day( mixed $fyear, mixed $fmonth, mixed $fday )
public
# weekday( mixed $fyear, mixed $fmonth, mixed $fday )
public
# prior_monday( mixed $fyear, mixed $fmonth, mixed $fday )
public static string
# past_date( mixed $fmonth, mixed $fday = 1, mixed $fyear = null )

Return the nearest date in the past, based on day and month. Automatically attaches the correct year.

Return the nearest date in the past, based on day and month. Automatically attaches the correct year.

This is useful for determining a financial year start or end date.

Parameters

$fmonth
$fmonth int The number of the month (e.g. 3 is March, 4 is April)
$fday
$fday int The day of the month
$fyear
$fyear int Determine historical value

Returns

string
Date in YYYY-MM-DD format
public FormField
# scaffoldFormField( string $title = null, mixed $params = null )

Returns a FormField instance used as a default for form scaffolding.

Returns a FormField instance used as a default for form scaffolding.

Used by SearchContext, ModelAdmin, DataObject::scaffoldFormFields()

Parameters

$title
string $title Optional. Localized title of the generated instance
$params

Returns

FormField
FormField

Overrides

DBField::scaffoldFormField

Methods inherited from DBField

ATT(), HTML(), HTMLATT(), JS(), LowerCase(), RAW(), RAWURLATT(), URLATT(), UpperCase(), XML(), __construct(), addToQuery(), create(), debug(), defaultSearchFilter(), exists(), forTemplate(), getName(), getValue(), hasValue(), nullValue(), prepValueForDB(), saveInto(), scaffoldSearchField(), setName(), setTable(), writeToManipulation()

Methods inherited from ViewableData

ATT_val(), BaseHref(), CSSClasses(), ColumnBreak(), ColumnCalc(), ColumnNumber(), ColumnPad(), ColumnPos(), CurrentMember(), CurrentPage(), Debug(), Even(), EvenOdd(), First(), FirstLast(), HasPerm(), IsAjax(), JS_val(), Last(), Me(), Middle(), MiddleString(), Modulus(), MultipleOf(), Odd(), Pos(), RAW_val(), SQL_val(), ThemeDir(), ThemeName(), Top(), TotalItems(), XML_val(), __get(), __isset(), __set(), buildCastingCache(), cachedCall(), castingClass(), castingHelper(), castingHelperPair(), castingObjectCreator(), castingObjectCreatorPair(), customise(), defineMethods(), escapeTypeForField(), getField(), getIterator(), getSecurityID(), getXMLValues(), hasField(), i18nLocale(), iteratorProperties(), obj(), renderWith(), setCustomisedObj(), setField()

Methods inherited from Object

__call(), __toString(), __wakeup(), addMethodsFrom(), addStaticVars(), addWrapperMethod(), add_extension(), add_static_var(), allMethodNames(), cacheToFile(), cacheToFileWithArgs(), clearCache(), combined_static(), createMethod(), create_from_string(), extInstance(), extend(), getCustomClass(), getExtensionInstance(), getExtensionInstances(), get_extensions(), get_static(), hasExtension(), hasMethod(), has_extension(), invokeWithExtensions(), is_a(), loadCache(), parentClass(), parse_class_spec(), remove_extension(), sanitiseCachename(), saveCache(), set_stat(), set_static(), set_uninherited(), stat(), strong_create(), uninherited(), uninherited_static(), useCustomClass()

Magic methods summary

Properties summary

Properties inherited from DBField

$arrayValue, $defaultVal, $default_search_filter_class, $escape_type, $name, $tableName, $value

Properties inherited from ViewableData

$casting, $customisedObject, $default_cast, $failover, $iteratorPos, $iteratorTotalItems

Properties inherited from Object

$class, $extension_instances, $extensions

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -
Webylon 3.2 API Docs API documentation generated by ApiGen 2.8.0