Parse A Number

busymofo

Client
Регистрация
25.08.2012
Сообщения
26
Благодарностей
0
Баллы
0
I have a quick question so I am trying to take a number for a post date and schedule a future post in WP

so what I want to do is have it take the date of the post for example Sept 15 2012 (original post date)

It will go ahead and take 15 and assign it a variable (i tried to do this with the GET option) but it did not work

then I want it to randomly generate a number using random number (1-30) and assign it as new post date

then I want to check if the new post date is greater than the original post date

then have it input the New post Date only if it is > then original post date tried to use the (if function)

i have spent some time but i guess im just frustrated I cant get this to work any help would be appreciated
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 708
Баллы
113
You can generate random number with use of variable as a minimum value that you parsed (current date)

So when you generate number, you set variable as minimum and 30 as maximum.
And you will not need any logical steps
 
  • Спасибо
Реакции: busymofo

busymofo

Client
Регистрация
25.08.2012
Сообщения
26
Благодарностей
0
Баллы
0
yes it works thanks
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 708
Баллы
113
Good :az:
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)