and there’s no related option in Email template. is there anyway to add a field to store submit datetime ?
]]>But when I fetch the c_startdate from the external json-api, I get
2008-08-30 16:00:00
I managed to get 18:00:00 but I don’t know what’s wrong with the date? My template-code is written like this:
{c_startdate:datetime, d.M.Y, H:i:s,7200}
Please can anybody help? Do I need the Pro-Version?
Kind regards, Donald
]]>To install some function that according to the user’s IP the Copa America match appears in their local time?
For example: if the match is at 8PM UTC, then in Colombia it appears at the corresponding time and Venezuela 1 hour less?
Gracias!
]]>Please note that there was a problem reported with the date modification when one month is added or subtracted from the current one. This has not been reported by now for years of usage of both old and newest version of WP Date and Time Shortcode.
Date: 31.05.2024
[wpdts-month-name months="-1"] returns May
[wpdts-month-name months="+1"] returns July
I’ve made 2 test examples and they both do not work correctly, but they must, as they are written.
// With PHP DateTime class – [next_month_dt]
add_shortcode( 'next_month_dt', 'next_month_dt' );
function next_month_dt( $atts ) {
$dt = new DateTime('now', wp_timezone());
$dt->modify("next month"); // or "+1 month", must be June
return $dt->format("F"); // returns July
}
// With current_date – [prev_month_ct]
add_shortcode( 'prev_month_ct', 'prev_month_ct' );
function prev_month_ct( $atts ) {
$ts_now = current_time( 'timestamp', false );
$ts_res = strtotime( "previous month", $ts_now); // or "-1 month", must be April
return date("F", $ts_res); // returns May
}
Unfortunately it seems that this a problem with the PHP DateTime and/or DateTimeZone classes which is very bad because they are used by our plugin in the latest versions and the WordPress current_date() and wp_timezone function in our plugin’s old versions.
Can some help me test this in other environments e.g. PHP 5.6 and see if it works correctly there? Or should I submit a bug report to the PHP development team?
Thank you for your patience and understanding, and eventually support from the community.
]]>It’s me, again (sorry).
I have 2 problems that I can’t solve.
Here is the URL in question JSON: https://brewingtheory.hop3team.com/formations/la-maintenance-en-brasserie-et-micro-brasserie.json
My problems :
1 – I tried to format the date, but when I use this code as recommended in the documentation “:datetime,DATE_TIME_FORMAT” to put it in the day month year format, the date is no longer displayed.
(I tested with and without the quotes).
{upcoming_sessions.start_date:datetime,"m-d-Y"} au {upcoming_sessions.end_date}<br>
2 – I tried to call a list present in the JSON, but it doesn’t work (I most certainly misunderstood how to do it) :
{subloop-array:program:-1}
{module.name}<br>
{module.description}
{/subloop-array:program}
Otherwise, thanks to your valuable advice, I was able to call and correctly display the entire file (well, apart from these last 2 little problems).
Thanks in advance !
Best regards
Auréline
]]>If I set the field to use the HTML5 input, everything works as expected.
Watch this video (length 3:20 min):?https://share.vidyard.com/watch/SGEHpEtAfURzjBxdUJe33r
(I also opened an issue at github, but I was not sure where the right place is)
]]>I would like the back end marketing users to be able to enter a new Train in wp-admin by using a date picker and to store the date as a date, not a string.
I see that I can add custom fields but the values apparently can only be text. Then I’ve read some very old articles about metaboxes, but they don’t seem to support data types for the fields, such as a datetime type.
So two questions please:
First, with FSE and WordPress 6.x, are metaboxes still current? Every resource I find about coding them is very old.
Second, can I really do a datetime field with a metabox? Are there any data types for custom fields, short of using a plugin?
I’d rather learn how to code this all up myself, I have a decent amount of CS knowledge. Thanks for any help!