Jump to content

Module:Citation/CS1: Difference between revisions

fixed ref=harv to extract Year from Date
m>Wikid77
(changed to allow lowercase "asin-tld"; fixed typo to allow SSRN.)
m>Wikid77
(fixed ref=harv to extract Year from Date)
Line 269: Line 269:
     local OrigYear = args.origyear
     local OrigYear = args.origyear
     local Date = args.date
     local Date = args.date
    local DateIn = Date
     local LayDate = args.laydate
     local LayDate = args.laydate
     local Title = args.title or args.encyclopaedia or args.encyclopedia or args.dictionary
     local Title = args.title or args.encyclopaedia or args.encyclopedia or args.dictionary
Line 785: Line 786:
      
      
     -- Now enclose the whole thing in a <span/> element
     -- Now enclose the whole thing in a <span/> element
     if ( Year == nil ) then Year = string.sub(Date,-3) end
     if ( Year == nil ) then
        if (DateIn == nil or DateIn == "")
          then Year = ""
          else Year = string.sub(DateIn,-4,-1)
        end
    end
     local args = { class="citation " .. (config.CitationClass or "") }
     local args = { class="citation " .. (config.CitationClass or "") }
     if ( Ref ~= nil ) then  
     if ( Ref ~= nil ) then  
Line 1,100: Line 1,106:
--21Feb2013 Automatically unbolded volume+comma when > 4 long.
--21Feb2013 Automatically unbolded volume+comma when > 4 long.
--21Feb2013 Changed to allow lowercase "asin-tld".
--21Feb2013 Changed to allow lowercase "asin-tld".
--22Feb2013 Fixed ref=harv to extract Year from Date.
--
--
--End
--End
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.