Questions tagged as 'date'

1
answer

Date in English (en-us) [duplicate]

I have the following code in PHP: <?php setlocale(LC_ALL, "pt_BR", "pt_BR.iso-8859-1", "pt_BR.utf-8", "portuguese"); $tz_object = new DateTimeZone('Brazil/East'); $datetime = new DateTime(); $datetime->setTimezone($tz_object); $dia...
asked by 11.02.2017 / 02:31
1
answer

How to set date formats in Django 1.7 for the whole system

Is there any way to change display settings and / or date formatting at system level?     
asked by 08.02.2015 / 17:30
2
answers

How to make a date in full on common date?

I get a string with a date, and unfortunately there's no way to change it, in the format:    September 1, 2015 And make it into:    01/09/2015 The only way I found to do this would be by breaking the string and forming an array, an...
asked by 01.09.2015 / 17:57
3
answers

Calculate age by day, month and year

I'm trying to calculate the age by day, month, and year but I can not. I followed some examples but everyone goes wrong too. For example if the date of birth is 14/06/1992 this method returns 23 years and the correct one would be 22, it w...
asked by 15.06.2015 / 16:25
3
answers

SQL query in PHP and date format

I have a function in PHP that interacts with my SQL Server. It looks like this: public function buscaRelatorioHospedagem($nome,$de,$ate){ // TODO Essa função pode ser aproveitada pra aba nova $de--; $de++; $ate--; $ate++;...
asked by 25.05.2015 / 21:09
3
answers

Change the format of a date (time) that is in a String

I have two strings that receive hours, in this case, ArrivalTime and DepartureTime. The next format is HH: MM: SS. I would like to format this string for HH: MM how can I do this? I enter this text in ToggleButtons (setTextOn and setTextOff)....
asked by 20.10.2016 / 18:54
4
answers

Compare current date with javascript

I'm comparing today's date with today's date like this: if (new Date() > new Date('07/04/2017')) { alert('Hoje é maior que hoje?') } How can today be greater than today?     
asked by 04.07.2017 / 17:51
3
answers

Validate different date formats

I'm having trouble validating different date formats. I need to convert the dates to the Y-m-d format to save to the bank. The dates come like this: 11/12/2014 // MÊS/DIA/ANO 30/10/2014 // DIA/MÊS/ANO I have tried the simple way: echo...
asked by 12.11.2014 / 23:02
3
answers

How to return the first and last day of the current month in JavaScript?

I'm not sure how to return the first and last day of the current month in JS.     
asked by 02.08.2017 / 21:51
1
answer

Skip to next business day if the date falls on a weekend

In PHP, I have a certain date, coming from the database, which is the date a request was made. I need to add 5 business days to this date, which is the deadline for the request to be delivered. At this count I need to ignore the weekends....
asked by 27.07.2016 / 17:41