Revision: 28463
http://sourceforge.net/p/bibdesk/svn/28463
Author: hofman
Date: 2023-11-26 15:28:08 +0000 (Sun, 26 Nov 2023)
Log Message:
-----------
try to find month in month field when it includes the year
Modified Paths:
--------------
trunk/bibdesk/NSDate_BDSKExtensions.m
Modified: trunk/bibdesk/NSDate_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSDate_BDSKExtensions.m 2023-11-26 15:03:49 UTC (rev
28462)
+++ trunk/bibdesk/NSDate_BDSKExtensions.m 2023-11-26 15:28:08 UTC (rev
28463)
@@ -102,8 +102,19 @@
if (r.location != NSNotFound) {
start = r.location;
r = [monthString rangeOfCharacterFromSet:[NSCharacterSet
nonDecimalDigitCharacterSet] options:0 range:NSMakeRange(start, end - start)];
- if (r.location != NSNotFound)
+ if (r.location != NSNotFound) {
end = r.location;
+ if (end > start + 2) {
+ r = [monthString
rangeOfCharacterFromSet:[NSCharacterSet decimalDigitCharacterSet] options:0
range:NSMakeRange(end, [monthString length] - end)];
+ if (r.location != NSNotFound) {
+ start = r.location;
+ end = [monthString length];
+ r = [monthString
rangeOfCharacterFromSet:[NSCharacterSet nonDecimalDigitCharacterSet] options:0
range:NSMakeRange(start, end - start)];
+ if (r.location != NSNotFound)
+ end = r.location;
+ }
+ }
+ }
}
}
if (start > 0 || end < [monthString length])
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit