PEAR Manual
Prev |  | Next

# Net_NNTP_Client::getDate()

Net_NNTP_Client::getDate() -- Get date from NNTP-server

## Synopsis

    require_once 'Net/NNTP/Client.php';

``mixed Net_NNTP_Client::getDate` ([integer $format = 1])`

## Description

Retrieves the date from the NNTP-server.

## Parameter

- `$format` - Tetermines which format to return.

## Return value

Table 48-1.

$format | returns
--- | ---
0 | `timestamp`
1 | `array` - a hash with the date `$date['y']` Year `$date['m']` Month `$date['d']` Day

## Note

since 0.3

This function can not be called statically.

## Example

Example 48-1. Using getDate()
    ...
    $date = $nntp->getDate();
    echo "Date: ".$date['m']."-".$date['d']."-".$date['y'];

Prev | Home | Next
Net_NNTP_Client::getBodyRaw() | Up | Net_NNTP_Client::getGroups()