Tags » Datetime

Symfony2 conver Datetime to String in the Twig template

{{ leave.startdate }}

causing an error like this :

ContextErrorException: Catchable Fatal Error: Object of class DateTime could not be converted to string

here is how to convert Object of class DateTime to String in Symfony2 | Twig

{{ leave.startdate|date(‘Y-m-d’) }}

PHP

Localising dates in Java 8 using DateTimeFormatter

Introduction

In this post we saw how to format dates according to some ISO and RCF standards. They can help you to quickly format a date in a standardised way. 272 more words

Java

Formatting dates in Java 8 using DateTimeFormatter

Introduction

Formatting dates – and numbers for that matter – can be a complex matter. The DateTimeFormatter class provides pre-defined formats that adhere to ISO and RCF specifications. 1,238 more words

Java

Time zones in Java 8 Date and Time API

Introduction

I know for a fact that all programmers love working with time zones. Chances are high that you, as a reader of this blog, are also a programmer so I bet you also just love time zones. 526 more words

Java

Setting and viewing Date and Time in Ubuntu Linux

So, now I have a Vagrant server running properly but the date time it’s completly wrong, my timezone it’s America/Bogota and I setted accordly in the php.ini configuration, if you don’t know how to do this follow those simple steps. 184 more words

Ubuntu

Adjusting the date in Java 8 Date and Time API

Introduction

We saw a couple of new concepts in the Java 8 Date and Time API on this blog:

Java