Developing #66, I have discovered a bug in the parse method of the adapter.
To create a Luxon DateTime object, you must use DateTime.from* methods which are all receiving the options in order to set the locale, zone, numbering and calendar systems.
Currently the adapter is not passing the user options (and therefore it's ignoring it) in the parse method when the value to parse is an object which represents a date time ({ year: ..., month: ..., day:...}). I think this way to map a timestamp is not so used (I have never seen it used with Chart,js), nevertheless, being there, it should be adjusted.
} else if (type === 'object' && !(value instanceof DateTime)) {
value = DateTime.fromObject(value);
}
Developing #66, I have discovered a bug in the
parse
method of the adapter.To create a Luxon
DateTime
object, you must useDateTime.from*
methods which are all receiving the options in order to set the locale, zone, numbering and calendar systems.Currently the adapter is not passing the user options (and therefore it's ignoring it) in the parse method when the value to parse is an object which represents a date time (
{ year: ..., month: ..., day:...}
). I think this way to map a timestamp is not so used (I have never seen it used with Chart,js), nevertheless, being there, it should be adjusted.I'll submit a PR.
EDIT
PR #64 is fixing it.