Generator date format

Generator date format

chrislambertukchrislambertuk Posts: 3Questions: 2Answers: 0

When specifying date format as yyyy-mm-dd in Generator the .php code generated often comes out wrongly as:

    ->validator( Validate::dateFormat( 'Y-m-d' ) )
    ->getFormatter( Format::dateSqlToFormat( 'Y-m-d' ) )
    ->setFormatter( Format::dateFormatToSql( 'Y-m-d' ) )

Not always, but more often than not!

The generated code expected would be:

    ->validator( Validate::dateFormat( 'Y-m-d' ) )
    ->getFormatter( Format::dateSqlToFormat( 'Y-m-d' ) )
    ->setFormatter( Format::dateFormatToSql( 'Y-m-d' ) )

Is this a bug or a feature?

Answers

  • allanallan Posts: 63,512Questions: 1Answers: 10,472 Site admin

    I might just be missing it, but I don't actually see a difference between the two code blocks above.

    The Generator output should always be the same for the same input!

    Allan

This discussion has been closed.