Friday, February 24, 2012

expand_date - Drupal Pre Defined Function

expand_date - Drupal Pre Defined Function

Assign the expand_date() function value to a variable and print that variable.
$exp_date = expand_date();
print "<pre>" ;
print_r($exp_date);
print "</pre>" ;

You will get all those details for this function,you can use it anywhere over the module.
Array
(
    [#value] => Array
        (
            [day] => 24 //(current day)
            [month] => 2 //(current month)
            [year] => 2012 //(current year)
        )

    [#tree] => 1
    [month] => Array  //(Months List)
        (
            [#type] => select
            [#value] => 2
            [#attributes] => 
            [#options] => Array
                (
                    [1] => Jan
                    [2] => Feb
                    [3] => Mar
                    [4] => Apr
                    [5] => May
                    [6] => Jun
                    [7] => Jul
                    [8] => Aug
                    [9] => Sep
                    [10] => Oct
                    [11] => Nov
                    [12] => Dec
                )

        )

    [day] => Array //(Days List)
        (
            [#type] => select
            [#value] => 24
            [#attributes] => 
            [#options] => Array
                (
                    [1] => 1
                    [2] => 2
                    [3] => 3
                    [4] => 4
                    [5] => 5
                    [6] => 6
                    [7] => 7
                    [8] => 8
                    [9] => 9
                    [10] => 10
                    [11] => 11
                    [12] => 12
                    [13] => 13
                    [14] => 14
                    [15] => 15
                    [16] => 16
                    [17] => 17
                    [18] => 18
                    [19] => 19
                    [20] => 20
                    [21] => 21
                    [22] => 22
                    [23] => 23
                    [24] => 24
                    [25] => 25
                    [26] => 26
                    [27] => 27
                    [28] => 28
                    [29] => 29
                    [30] => 30
                    [31] => 31
                )

        )

    [year] => Array //(Year List from 1900 to 2050)
        (
            [#type] => select
            [#value] => 2012
            [#attributes] => 
            [#options] => Array
                (
                    [1900] => 1900
                    [1901] => 1901
                    [1902] => 1902
                    [1903] => 1903
                    [1904] => 1904
                    [1905] => 1905
                    [1906] => 1906
                    [1907] => 1907
                    [1908] => 1908
                    [1909] => 1909
                    [1910] => 1910
                    [1911] => 1911
                    [1912] => 1912
                    [1913] => 1913
                    [1914] => 1914
                    [1915] => 1915
                    [1916] => 1916
                    [1917] => 1917
                    [1918] => 1918
                    [1919] => 1919
                    [1920] => 1920
                    [1921] => 1921
                    [1922] => 1922
                    [1923] => 1923
                    [1924] => 1924
                    [1925] => 1925
                    [1926] => 1926
                    [1927] => 1927
                    [1928] => 1928
                    [1929] => 1929
                    [1930] => 1930
                    [1931] => 1931
                    [1932] => 1932
                    [1933] => 1933
                    [1934] => 1934
                    [1935] => 1935
                    [1936] => 1936
                    [1937] => 1937
                    [1938] => 1938
                    [1939] => 1939
                    [1940] => 1940
                    [1941] => 1941
                    [1942] => 1942
                    [1943] => 1943
                    [1944] => 1944
                    [1945] => 1945
                    [1946] => 1946
                    [1947] => 1947
                    [1948] => 1948
                    [1949] => 1949
                    [1950] => 1950
                    [1951] => 1951
                    [1952] => 1952
                    [1953] => 1953
                    [1954] => 1954
                    [1955] => 1955
                    [1956] => 1956
                    [1957] => 1957
                    [1958] => 1958
                    [1959] => 1959
                    [1960] => 1960
                    [1961] => 1961
                    [1962] => 1962
                    [1963] => 1963
                    [1964] => 1964
                    [1965] => 1965
                    [1966] => 1966
                    [1967] => 1967
                    [1968] => 1968
                    [1969] => 1969
                    [1970] => 1970
                    [1971] => 1971
                    [1972] => 1972
                    [1973] => 1973
                    [1974] => 1974
                    [1975] => 1975
                    [1976] => 1976
                    [1977] => 1977
                    [1978] => 1978
                    [1979] => 1979
                    [1980] => 1980
                    [1981] => 1981
                    [1982] => 1982
                    [1983] => 1983
                    [1984] => 1984
                    [1985] => 1985
                    [1986] => 1986
                    [1987] => 1987
                    [1988] => 1988
                    [1989] => 1989
                    [1990] => 1990
                    [1991] => 1991
                    [1992] => 1992
                    [1993] => 1993
                    [1994] => 1994
                    [1995] => 1995
                    [1996] => 1996
                    [1997] => 1997
                    [1998] => 1998
                    [1999] => 1999
                    [2000] => 2000
                    [2001] => 2001
                    [2002] => 2002
                    [2003] => 2003
                    [2004] => 2004
                    [2005] => 2005
                    [2006] => 2006
                    [2007] => 2007
                    [2008] => 2008
                    [2009] => 2009
                    [2010] => 2010
                    [2011] => 2011
                    [2012] => 2012
                    [2013] => 2013
                    [2014] => 2014
                    [2015] => 2015
                    [2016] => 2016
                    [2017] => 2017
                    [2018] => 2018
                    [2019] => 2019
                    [2020] => 2020
                    [2021] => 2021
                    [2022] => 2022
                    [2023] => 2023
                    [2024] => 2024
                    [2025] => 2025
                    [2026] => 2026
                    [2027] => 2027
                    [2028] => 2028
                    [2029] => 2029
                    [2030] => 2030
                    [2031] => 2031
                    [2032] => 2032
                    [2033] => 2033
                    [2034] => 2034
                    [2035] => 2035
                    [2036] => 2036
                    [2037] => 2037
                    [2038] => 2038
                    [2039] => 2039
                    [2040] => 2040
                    [2041] => 2041
                    [2042] => 2042
                    [2043] => 2043
                    [2044] => 2044
                    [2045] => 2045
                    [2046] => 2046
                    [2047] => 2047
                    [2048] => 2048
                    [2049] => 2049
                    [2050] => 2050
                )

        )

)

No comments:

Post a Comment