Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ransome
sleek
Commits
93d47d2a
Commit
93d47d2a
authored
Jun 07, 2021
by
Daniel Weisser
Browse files
Fix date format and save with date
parent
7cb70411
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/js/todotxtExtensions.mjs
View file @
93d47d2a
...
...
@@ -15,7 +15,6 @@ RecExtension.prototype.parsingFunction = function(line) {
export
{
RecExtension
};
// TODO Use SugarDueExtension only for parsing from input field otherwise normal DueExtension
function
SugarDueExtension
()
{
this
.
name
=
"
due
"
;
}
...
...
@@ -35,7 +34,7 @@ SugarDueExtension.prototype.parsingFunction = function (line) {
match
=
words
.
slice
(
0
,
i
).
join
(
"
"
);
dueDate
=
Sugar
.
Date
.
create
(
match
);
if
(
Sugar
.
Date
.
isValid
(
dueDate
))
{
return
[
dueDate
,
line
.
replace
(
"
due:
"
+
match
,
''
),
match
];
return
[
dueDate
,
line
.
replace
(
"
due:
"
+
match
,
''
),
Sugar
.
Date
.
format
(
dueDate
,
'
%Y-%m-%d
'
)
];
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment