- Add some month/year tests (many of which fail -- refs #1731)
- Always delete empty strToDate part (for proper testing)
This commit is contained in:
parent
7b6e017d38
commit
908b96ccc4
1 changed files with 4 additions and 3 deletions
|
@ -2214,9 +2214,10 @@ Zotero.Date = new function(){
|
|||
// clean up date part
|
||||
if(date.part) {
|
||||
date.part = date.part.replace(/^[^A-Za-z0-9]+/, "").replace(/[^A-Za-z0-9]+$/, "");
|
||||
if(!date.part.length) {
|
||||
date.part = undefined;
|
||||
}
|
||||
|
||||
if(date.part === "" || date.part == undefined) {
|
||||
delete date.part;
|
||||
}
|
||||
|
||||
return date;
|
||||
|
|
Loading…
Reference in a new issue