Author Topic: Date format in source files  (Read 4071 times)

Offline jdx

  • Multiple posting newcomer
  • *
  • Posts: 11
Date format in source files
« on: April 14, 2023, 01:38:24 am »
I have noticed that recently date format has been changed in a few files, e.g. see version.h in r13258. This format is misleading, taking into account that C::B is an open, international project. E.g. what would 23/04/23 mean? The correct date format for such projects should be ISO 8601.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6025
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Date format in source files
« Reply #1 on: April 14, 2023, 03:10:52 am »
I agree.
I like the YYYY-MM-DD format mentioned in ISO 8601.
One question:  Where is the file "version.h"?
In my local C::B build folder, I only find a file named "autorevision.h", and I see it does use YYYY-MM-DD format in its svnDate value.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline jdx

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Date format in source files
« Reply #2 on: April 14, 2023, 05:09:24 am »
I meant "version.h changed in revision 13258". It's actual location is <SRC_ROOT>/src/plugins/contrib/codesnippets/version.h.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6025
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Date format in source files
« Reply #3 on: April 14, 2023, 07:09:04 am »
I meant "version.h changed in revision 13258". It's actual location is <SRC_ROOT>/src/plugins/contrib/codesnippets/version.h.
OK, I see,  It is in a plug in source code.
I suggest every plugin should use the standard time format.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6025
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.