Dispay a Dynamic Copyright Date

This function is useful for displaying the copyright date at the bottom of a web page. On many sites you will see invalid copyright dates. This function allow you to dynamically display either the current year's date or a range of dates from when the site was first created.
Function CopyrightYear(SITE_CREATED_YEAR)
    '-- ==========================================================
    '-- Returns String of year web site was create to current year
    '-- ==========================================================
    If Year(Now) > SITE_CREATED_YEAR Then
        '-- Return year website was created PLUS the current year
        CopyrightYear = SITE_CREATED_YEAR & " - " & Year(Now)
        '-- Return Year website was created because we are still in current year!
        CopyrightYear = SITE_CREATED_YEAR
    End If
End Function


© 1998 - 2024

howto reference examples samples source code tips ASP VBScript

Back To Top
© 1998 - 2024 psacake.com
Version 7.21 | Advertise on this site