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

Packages

  • auth
  • Booking
  • cart
    • shipping
    • steppedcheckout
  • Catalog
  • 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
  • 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
  • ForeignKey
  • Hierarchy
  • HTMLText
  • HTMLVarchar
  • ImportLog_Item
  • Int
  • ManagerEmailOrderNotification
  • Material3D_File
  • MediawebPage_File
  • MediawebPage_Photo
  • MobileContentDecorator
  • Money
  • MultiEnum
  • MySQLDatabase
  • MySQLQuery
  • OrderDataObject
  • OrderHandlersDecorator
  • OrderItemVariationDecorator
  • OrderService
  • OrderServiceOrder
  • OrdersExportDecorator
  • PageIcon
  • PageWidgets
  • Payment
  • PaymentMethodShippingDecorator
  • PaymentOrderExtension
  • Percentage
  • PhotoAlbumItem
  • PhotoAlbumProductLinkDecorator
  • PhotoAlbumWidgetLinkDecorator
  • PhotoGalleryHomepageWidget_Item
  • PrimaryKey
  • Product3DDecorator
  • ProductCatalogCatalogLinkedDecorator
  • 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 SS_Datetime

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

For all computations involving the current date and time, please use SS_Datetime::now() instead of PHP's built-in date() and time() methods. This ensures that all time-based computations are testable with mock dates through SS_Datetime::set_mock_now().

Object
Extended by ViewableData implements IteratorAggregate
Extended by DBField
Extended by Date
Extended by SS_Datetime
Package: sapphire\model
Located at sapphire/core/model/fieldtypes/Datetime.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

Date::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

Overrides

Date::Nice
public
# Nice24( )
public
# Date( )
public
# Time( )
public
# Time24( )
public
# requireField( )

Add the field to the underlying database.

Add the field to the underlying database.

Overrides

Date::requireField
public
# URLDatetime( )
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

Date::scaffoldFormField
public FormField
# scaffoldSearchField( string $title = null )

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

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

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

Parameters

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

Returns

FormField
FormField

Overrides

DBField::scaffoldSearchField
public static SS_Datetime
# now( )

Returns either the current system date as determined by date(), or a mocked date through SS_Datetime::set_mock_now().

Returns either the current system date as determined by date(), or a mocked date through SS_Datetime::set_mock_now().

Returns

SS_Datetime
SS_Datetime
public static
# set_mock_now( SS_Datetime|string $datetime )

Mock the system date temporarily, which is useful for time-based unit testing. Use SS_Datetime::clear_mock_now() to revert to the current system date. Caution: This sets a fixed date that doesn't increment with time.

Mock the system date temporarily, which is useful for time-based unit testing. Use SS_Datetime::clear_mock_now() to revert to the current system date. Caution: This sets a fixed date that doesn't increment with time.

Parameters

$datetime
SS_Datetime|string $datetime Either in object format, or as a SS_Datetime compatible string.
public static
# clear_mock_now( )

Clear any mocked date, which causes Now() to return the current system date.

Clear any mocked date, which causes Now() to return the current system date.

Methods inherited from Date

Ago(), Day(), DayOfMonth(), Format(), FormatI18N(), Full(), InFuture(), InPast(), IsToday(), Long(), Month(), NiceUS(), RangeString(), Rfc2822(), Rfc3339(), Rfc822(), ShortMonth(), TimeDiff(), TimeDiffIn(), URLDate(), Year(), day_before(), days_between(), next_day(), past_date(), prior_monday(), weekday()

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(), 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

protected static mixed $mock_now
#

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.1 API Docs API documentation generated by ApiGen 2.8.0