fbpx
Wikipedia

Módulo:Ficha/fechas

Este módulo no tiene página de documentación[crear]
local getArgs = require('Módulo:Argumentos').obtenerArgumentos local p = {}  function p.dates(frame)  local returnval;  local args = getArgs(frame);   if table.getn(args) < 2 then  if args['1'] == nil and args['2'] == nil then  return '';  elseif args['1'] == nil then  return args['2'];  elseif args['2'] == nil then  return args['1'];  end  end   args['1'] = args['1']:gsub("&nbsp;"," ");  args['2'] = args['2']:gsub("&nbsp;"," ");   local dmy = false;  local pr1, m1, d1, y1, su1 = string.match(args['1'], '(.-)(%u%a+)%s(%d+),%s(%d+)(.*)');  local pr2, m2, d2, y2, su2 = string.match(args['2'], '(.-)(%u%a+)%s(%d+),%s(%d+)(.*)');  if y1 == nil then  dmy = true;  pr1, d1, m1, y1, su1 = string.match(args['1'], '(.-)(%d%d?)%s(%a+)%s(%d+)(.*)');  pr2, d2, m2, y2, su2 = string.match(args['2'], '(.-)(%d%d?)%s(%a+)%s(%d+)(.*)');  end   local dash = '&nbsp;– ';  if y1 ~= nil and y2 ~= nil then  su1 = su1 or '';  su2 = su2 or '';   local MONTHS = {enero=1, febrero=2, marzo=3, abril=4, mayo=5, junio=6, julio=7, agosto=8, septiembre=9, octubre=10, noviembre=11, diciembre=12};  local diff = os.time({year=y2,month=MONTHS[m2],day=d2,hour=0,min=0,sec=0})-os.time({year=y1,month=MONTHS[m1],day=d1,hour=0,min=0,sec=0});   if diff < 0 then  returnval = 'Invalid date range';  else  if y1 == y2 then  if dmy == false then  returnval = pr1..m1..' '..d1..su1..dash..pr2..m2..' '..d2..', '..y2..su2;  else  returnval = pr1..d1..' '..m1..su1..dash..pr2..d2..' '..m2..' '..y2..su2;  end  else  if dmy == false then  returnval = pr1..m1..' '..d1..', '..y1..su1..dash..pr2..m2..' '..d2..', '..y2..su2;  else  returnval = pr1..d1..' '..m1..' '..y1..su1..dash..pr2..d2..' '..m2..' '..y2..su2;  end  end  end  else  returnval = args['1']..dash..args['2'];  end   return returnval; end  return p 

módulo, ficha, fechas, este, módulo, tiene, página, documentación, crear, módulo, ficha, fechas, código, discusión, tests, comprobar, tests, subpáginas, enlaces, local, getargs, require, módulo, argumentos, obtenerargumentos, local, function, dates, frame, loc. Este modulo no tiene pagina de documentacion crear Modulo Ficha fechas codigo doc discusion tests comprobar tests subpaginas enlaces local getArgs require Modulo Argumentos obtenerArgumentos local p function p dates frame local returnval local args getArgs frame if table getn args lt 2 then if args 1 nil and args 2 nil then return elseif args 1 nil then return args 2 elseif args 2 nil then return args 1 end end args 1 args 1 gsub amp nbsp args 2 args 2 gsub amp nbsp local dmy false local pr1 m1 d1 y1 su1 string match args 1 u a s d s d local pr2 m2 d2 y2 su2 string match args 2 u a s d s d if y1 nil then dmy true pr1 d1 m1 y1 su1 string match args 1 d d s a s d pr2 d2 m2 y2 su2 string match args 2 d d s a s d end local dash amp nbsp if y1 nil and y2 nil then su1 su1 or su2 su2 or local MONTHS enero 1 febrero 2 marzo 3 abril 4 mayo 5 junio 6 julio 7 agosto 8 septiembre 9 octubre 10 noviembre 11 diciembre 12 local diff os time year y2 month MONTHS m2 day d2 hour 0 min 0 sec 0 os time year y1 month MONTHS m1 day d1 hour 0 min 0 sec 0 if diff lt 0 then returnval Invalid date range else if y1 y2 then if dmy false then returnval pr1 m1 d1 su1 dash pr2 m2 d2 y2 su2 else returnval pr1 d1 m1 su1 dash pr2 d2 m2 y2 su2 end else if dmy false then returnval pr1 m1 d1 y1 su1 dash pr2 m2 d2 y2 su2 else returnval pr1 d1 m1 y1 su1 dash pr2 d2 m2 y2 su2 end end end else returnval args 1 dash args 2 end return returnval end return p Obtenido de https es wikipedia org w index php title Modulo Ficha fechas amp oldid 125646448, wikipedia, wiki, leyendo, leer, libro, biblioteca,

español

, española, descargar, gratis, descargar gratis, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, imagen, música, canción, película, libro, juego, juegos