editor pad texto ( Wordpad )
Mostrar más instrucciones
Es el primer viernes del año
1
Utilice el editor de texto para abrir el . archivo en el que desea buscar todos los viernes y encontrar la ubicación en el script que desea encontrar las fechas
2
Escriba " $ año = '2010 ' ", o cualquier año que deseas utilizar
3
Escriba "$ beginYear = mktime ( 0 , 0, 0 , 1 , 1, $ año ) ; " . .
4
Type " $ BeginDate = getdate ($ beginYear ) ; " .
5
tipo" if ($ BeginDate [' wday '] < = 5 ) {"
6
. Escriba " $ firstFridayTime = $ BeginDate [ 0 ] + ( ( 5 - $ BeginDate [' wday ']) * 86 400 ) ; " . .
7
Tipo " } else {"
8
Escriba " $ firstFridayTime = $ BeginDate [ 0 ] + ( ($ BeginDate [' wday ']) * 86 400 ) ; " . .
9
Tipo " }"
Encontrar todos los viernes
10
Escriba " $ i = 0 ; " .
11
Tipo Mientras "($ y == $ año ) {"
12
Tipo ". fridayTime $ = $ firstFridayTime + ( $ i * 604800 ) ; $ viernes [ ] = date ( ' "
13
tipo . " M j Y ', $ fridayTime ) ; " .
14
Escriba" $ año = date ( ' Y ', $ fridayTime ) ; " .
15
Type" $ i + + } ; ".