Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New date helper methods day,month,year #225

Closed
mnewnham opened this issue Apr 14, 2016 · 0 comments
Closed

New date helper methods day,month,year #225

mnewnham opened this issue Apr 14, 2016 · 0 comments
Assignees
Labels
core ADOdb core (library and base classes) feature Enhancement requests
Milestone

Comments

@mnewnham
Copy link
Contributor

These new methods provide a simple shortcut to a timestamp field formatted with the following values:

  • Day as zero padded 2 digit number
  • Month as zero padded 2 digit number
  • Year as 4 digit number

The methods are documented in the ADOdb reference manual - day, month and year

The sqlite version of these methods avoids the DST issue with sqlDate by directly calling the native date functions instead of adodb_date()

to use, simply call

$string = $db->month('some_field')
@mnewnham mnewnham self-assigned this Apr 14, 2016
@mnewnham mnewnham added enhancement core ADOdb core (library and base classes) labels Apr 14, 2016
@mnewnham mnewnham added this to the v5.21 milestone Apr 14, 2016
mnewnham added a commit that referenced this issue Apr 14, 2016
These provide an easy-to-use  wrapper to the sqlDate method to return 
commonly used date attributes. For more information see the method 
descriptions in the ADOdb reference manual.
@dregad dregad closed this as completed in 1212f9d Apr 27, 2016
@dregad dregad added feature Enhancement requests and removed enhancement labels Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core ADOdb core (library and base classes) feature Enhancement requests
Projects
None yet
Development

No branches or pull requests

2 participants