Questions tagged as 'date'

1
answer

Problem adding month to date with php

I'm having a problem adding months to php, I had done using modify but as in own documentation already informs that of the error, hence I tried 3 other functions that I found and hence the 3 and I bring the same error, when a date starts on da...
asked by 25.04.2017 / 16:39
1
answer

Repeat a number of times in a range of days

I have this code that repeats a number of times the day of each week. $hoje = new DateTime(); $semana = new DateInterval('P7D'); $repeticoes = 3; // Printa primeira data antes de somar os dias echo $hoje->format('Y-m-d '.$_POST['hora_inic...
asked by 09.11.2018 / 14:13
1
answer

JsonFormat changing date in a get request

I have a web service in java using Spring Boot, in a class I have an attribute of type date and I use JsonFormat to format the date and be able to convert on the client side, using Gson. However, even setting the locale for the zone of Brazil, w...
asked by 09.04.2017 / 01:09
1
answer

Calculate percentage between 2 numbers

I have to do a percentage system where I have 2 dates in TIMEUNIX , the end date ($cota->ultimo_recebimento) and the current day that I get with the time() function of PHP. I tried to do this: <?php echo ((time() / $c...
asked by 10.02.2016 / 15:32
2
answers

How to add +10 integer seconds to date in a loop in PHP

I want the loop to run 10 times, and that every loop the $tempo variable that has the date / em> minute and seconds receive +10 seconds, but in the final result does not appear in fragmented seconds, 59, I want onl...
asked by 31.03.2016 / 02:03
1
answer

Change timezone javascript

I have an application hosted on heroku. So every date that is generated there in api and returned to the front always returns a day late. Already my front, is hosted in Hostinger, so, ends up conflicting the dates because of timezone. I've tr...
asked by 08.11.2018 / 16:43
1
answer

Convert PHP data to save in Mysql database [duplicate]

I need to receive a date using the datapicker as dd / mm / yyyy and switch to the accepted format in the database (mysql). I have the accessor methods (Getter and Setter) in them I applied this function date and the strstring to convert:...
asked by 08.10.2018 / 17:29
1
answer

Set current date in Input type Date

I want to set the current date in this input type date; using this way with php it just gives the value of the current date, but viewing shows only dd / mm / yyyy, but inspecting the code the value of the "value" is with the current date. Can so...
asked by 26.07.2018 / 21:47
1
answer

Add date in days until the specific day of the week arrives

I have a difficult task for you. I am developing a sales system for the company that I work for. Some customers require that tickets be issued due on specific days, eg: The company Fulano LTDA demands that the ticket expire on a Wednesday....
asked by 02.07.2018 / 19:13
1
answer

ASP.Net and C # - Reducing DropDownList options according to current date

On my client's site, I have on one page a DropDownList with the months of the year. Unfortunately, the value property is written in months rather than numbers. <asp:DropDownList ID="ddlMesReajuste" runat="server" AppendDataBoundItems="true"...
asked by 21.06.2018 / 16:53