Forums / Suggestions / birthday datatype

birthday datatype

Author Message

Paul Borgermans

Friday 13 August 2004 8:44:46 am

Great work Emil,

This will solve the birthday problems with >34y guys/girls.

I'll also pursue a "long" datetime datatype

Tx

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Tony Wood

Friday 13 August 2004 9:53:37 am

>>This will solve the birthday problems with >34y guys/girls.
Now your making me feel old :(

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Guttorm Flatabø

Saturday 14 August 2004 12:03:11 pm

The testing I did with with ADOdb was largely successful, only it didn't improve anything;-)

The debug output would complain about missing arguments probably because all params in adodb_mktime were compulsory, this improved with the latest release where only "hour, min, secs is compulsory", but those are the ones not used in eZP (from what I understand). I showed the code to a guy I know that actually know programming and he said that all params were declared (right word?) although half of them with "0" which probably is the problem. I was suppose to show him the actual debug, but then came the nice weather here in Norway and I took a holiday, and here comes Emil and solves it all!

I suppose we can conclude that the current ADOdb can't be implemented without some hacking, but the way I understand it, it is the authors intention to make it in line with the standard mktime. Actually it took 5 days from my first post at his fora to he released an improved (but not compatible) version.

Thank you for your solution Emil!
Are there any disadvantages to the birthday datatype and the date datatype? What date-range does it support?

Eirik Alfstad Johansen

Tuesday 17 August 2004 1:14:46 am

Thanks a lot, Emil. Just in time for my project deadline. :)

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Lip Sin Choo

Wednesday 08 September 2004 1:30:39 am

had the problem with birthdates before 1970 when we switched from Red Hat 7 to Fedora Core 1.

I am using <b>adodb_mktime()</b> and it is working fine now.

Guttorm Flatabø

Wednesday 08 September 2004 5:36:36 am

Could you please elaborate? What version of Ez publish and adodb_mktime do you use, and how did you implement it? I have tried and failed, with debug errors complaining about <i>missing argument</i> (as far as I can remember).

--Guttorm Flatabø

Erik Weinmaster

Tuesday 12 October 2010 7:13:22 am

I just saw this thread so my response is probably to late. However, I have the same problem when storing a date of birth for people as objects. Thus I created a data type that is 'date as text'. It works by storing xml text of the applicable information. It will also use the year (if entered) as the sortable field. I set it up so that if you mark it as required then there is different data that is required.

-> For instance if the dob is required you must at least enter a year.

-> If you have a year, then you can enter in a month.

->If you have a month then you can enter in a date.

So this will prevent someone from entering in just a date and nothing else, or date and year. I have the data type ready, but I'll wait to see if anyone is interested in it.

eZ debug

Timing: Jan 18 2025 00:58:43
Script start
Timing: Jan 18 2025 00:58:43
Module start 'content'
Timing: Jan 18 2025 00:58:44
Module end 'content'
Timing: Jan 18 2025 00:58:44
Script end

Main resources:

Total runtime1.0374 sec
Peak memory usage4,096.0000 KB
Database Queries214

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.1406180.8438
Module start 'content' 0.00740.9061 768.9844728.2500
Module end 'content' 0.91340.1239 1,497.2344359.8594
Script end 1.0373  1,857.0938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.01051.0133210.0005
Check MTime0.00150.1464210.0001
Mysql Total
Database connection0.00130.123810.0013
Mysqli_queries0.955092.05332140.0045
Looping result0.00260.24832120.0000
Template Total1.007497.120.5037
Template load0.00230.223220.0012
Template processing1.005196.882320.5025
Template load and register function0.00010.009910.0001
states
state_id_array0.00110.103710.0011
state_identifier_array0.00090.088820.0005
Override
Cache load0.00190.1818370.0001
Sytem overhead
Fetch class attribute can translate value0.00120.114670.0002
Fetch class attribute name0.00060.0610100.0001
XML
Image XML parsing0.00330.320170.0005
class_abstraction
Instantiating content class attribute0.00000.0017100.0000
General
dbfile0.00550.5322400.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs