Not tested

This commit is contained in:
2025-04-06 15:51:08 -07:00
parent 3f7affceef
commit bd03bba63e
28 changed files with 1727 additions and 949 deletions

View File

@ -108,12 +108,12 @@ internal partial class Property
format = dateFormat[1];
length = dateFormat[0].Length + dateFormat[1].Length;
for (int i = dateFormat[0].Length; i < length; i++)
_ = value.Append(filePath.NameWithoutExtension[i]);
_ = value.Append(filePath.FileNameFirstSegment[i]);
if (value.Length != format.Length)
continue;
if (DateTime.TryParseExact(value.ToString(), format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime checkDateTime))
{
if (filePath.NameWithoutExtension.Length < ticksExample.Length || !long.TryParse(filePath.NameWithoutExtension[^ticksExample.Length..], out long ticks))
if (filePath.NameWithoutExtension.Length < ticksExample.Length || !long.TryParse(filePath.FileNameFirstSegment[^ticksExample.Length..], out long ticks))
result = checkDateTime;
else
result = new DateTime(ticks);