-
Notifications
You must be signed in to change notification settings - Fork 2
tp TouchPointWP Utilities DateFormats
James K. edited this page Nov 22, 2024
·
7 revisions
Formatting Dates
- Class name: DateFormats
- Namespace: \tp\TouchPointWP\Utilities
- This is an abstract class
string tp\TouchPointWP\Utilities\DateFormats::TimeStringFormatted(\DateTimeInterface dt)
Get a string for a single given DateTime.
- Visibility: public
- This method is static.
- dt DateTimeInterface
- string -
int tp\TouchPointWP\Utilities\DateFormats::timestampWithoutOffset(?\DateTimeInterface dt)
- Visibility: public
- This method is static.
- dt ?\DateTimeInterface
- int -
int tp\TouchPointWP\Utilities\DateFormats::timestampAndOffset(?\DateTimeInterface dt)
- Visibility: public
- This method is static.
- dt ?\DateTimeInterface
- int -
string tp\TouchPointWP\Utilities\DateFormats::TimeRangeStringFormatted(\DateTimeInterface startDt, \DateTimeInterface endDt)
Get a time string for a given pair of DateTimesInterfaces. This should generally only be used when all of these are true:
-
The DateTimes are on the same day.
-
The event represented is not all-day.
-
Neither are null
- Visibility: public
- This method is static.
- startDt DateTimeInterface* endDt DateTimeInterface
- string -
string tp\TouchPointWP\Utilities\DateFormats::DateStringFormatted(\DateTimeInterface dt)
Get a string for a single given datetime string.
- Visibility: public
- This method is static.
- dt DateTimeInterface
- string -
string tp\TouchPointWP\Utilities\DateFormats::DateStringFormattedShort(\DateTimeInterface dt)
Get a (shorter) string for a single given datetime string.
- Visibility: public
- This method is static.
- dt DateTimeInterface
- string -
?string tp\TouchPointWP\Utilities\DateFormats::DurationToString(?\tp\TouchPointWP\Utilities\DateTimeExtended start, ?\tp\TouchPointWP\Utilities\DateTimeExtended end, bool|null multiDay)
Get a string for the period between $start and $end.
- Visibility: public
- This method is static.
- start ?\tp\TouchPointWP\Utilities\DateTimeExtended* end ?\tp\TouchPointWP\Utilities\DateTimeExtended* multiDay bool|null
- ?string -
\tp\TouchPointWP\Utilities\StringableArray tp\TouchPointWP\Utilities\DateFormats::DurationToStringArray(?\DateTimeInterface start, ?\DateTimeInterface end, ?bool multiDay, ?bool allDay)
Takes a start and end and returns one or two strings that are intended for use in a Meeting's Notable Attributes, but can be used for other similar cases.
- Visibility: public
- This method is static.
- start ?\DateTimeInterface* end ?\DateTimeInterface* multiDay ?bool* allDay ?bool
- \tp\TouchPointWP\Utilities\StringableArray -
Documentation generated November 24, 2024 11:00pm.
- Simple RSVP
- People Lists
- Involvements
- Outreach Partners
- SQL & Python Reports
- Events Calendar from Meetings (Beta)
- Events Calendar Plugin Integration (Deprecated)
- tp
- tp\TouchPointWP
- api
- Auth
- CalendarGrid
- EventsCalendar
- ExtraValueHandler
- Geo
- hasGeo
- hierarchical
- Involvement
- Involvement_PostTypeSettings
- InvolvementMembership
- Location
- Meeting
- module
- Partner
- Person
- PostTypeCapable
- RegistrationType
- Report
- Rsvp
- scheduled
- Stats
- storedAsPost
- Taxonomies
- TouchPointWP
- TouchPointWP_AdminAPI
- TouchPointWP_Exception
- TouchPointWP_Settings
- TouchPointWP_Widget
- TouchPointWP_WPError
- updatesViaCron
- Utilities
- tp\TouchPointWP