mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
feat: Improve date formatting in filename generation with zero-padding and two-digit year support. Fixes https://github.com/willmiao/ComfyUI-Lora-Manager/issues/102
This commit is contained in:
@@ -224,12 +224,13 @@ class SaveImage:
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
date_table = {
|
date_table = {
|
||||||
"yyyy": str(now.year),
|
"yyyy": f"{now.year:04d}",
|
||||||
"MM": str(now.month).zfill(2),
|
"yy": f"{now.year % 100:02d}",
|
||||||
"dd": str(now.day).zfill(2),
|
"MM": f"{now.month:02d}",
|
||||||
"hh": str(now.hour).zfill(2),
|
"dd": f"{now.day:02d}",
|
||||||
"mm": str(now.minute).zfill(2),
|
"hh": f"{now.hour:02d}",
|
||||||
"ss": str(now.second).zfill(2),
|
"mm": f"{now.minute:02d}",
|
||||||
|
"ss": f"{now.second:02d}",
|
||||||
}
|
}
|
||||||
if len(parts) >= 2:
|
if len(parts) >= 2:
|
||||||
date_format = parts[1]
|
date_format = parts[1]
|
||||||
|
|||||||
Reference in New Issue
Block a user